basicprogramming.org


Welcome, Guest. Please login or register.
Did you miss your activation email?
Forum time; Sep 02. 2010, 23:32
Home Help Search Calendar Login Register
News: The forum structure has been changed! Let us know what you think.

+  BASIC programming forum
|-+  BASIC programming
| |-+  General questions and discussions
| | |-+  sdlBASIC Proposed changes
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: 1 [2] Go Down Reply Print
Author Topic: sdlBASIC Proposed changes  (Read 642 times)
gersen
Sr. Member
****
Offline Offline

Posts: 382


« Reply #15 on: Jan 04. 2010, 06:21 » Reply with quote

Before the wait command was modified, I had edited the source myself to use usleep, I took it from smallbasic as shown here after a check for palmos

Code:
#elif defined(_Win32)
  Sleep(ms);
#elif defined(_DOS)
  delay(ms);
#else // Unix
  usleep(ms * 1000);
#endif

Yabasic uses the same excluding palmos and dos.

I only know about linux, but it appears the thread is suspended and cpu use falls to near zero. In all cases Control C will not break if done in the graphic window, but does in a terminal if the program was launched from one.

Mind you, most delays are in the ms range rather than seconds, so breaking out is not really a problem.

Report to moderator   Logged
Cybermonkey
Global Moderator
Hero Member
*****
Offline Offline

Posts: 1023



WWW
« Reply #16 on: Jan 04. 2010, 10:45 » Reply with quote

Yes, that's correct. I agree to that but unless vroby tells me more about the project I won't do such big changes.
Report to moderator   Logged

Best wishes,
Cybermonkey
Pages: 1 [2] Go Up Reply Print 
« previous next »
Jump to:  
Atom RDF RSS 0.91 RSS 2.0


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!