Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Replacing SLEEP with the TIMER

Author
Message
FieldDoc
23
Years of Service
User Offline
Joined: 30th May 2003
Location: London, UK
Posted: 22nd Jun 2003 22:44
Can anyone show me how I can continue to run things in the background whilst 'sleeping'?
I need my gameclock to continue to update even when a SLEEP command is encountered during my program.
I figured something like this would work (instead of SLEEP 5000)



But it doesn't! Help?!
Life is like a penis:
When it's soft you can't beat it, when it's hard you get screwed.
Fallout
23
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 22nd Jun 2003 23:30
Try swapping the UNTIL time = 5000 for UNTIL time => 5000. There's only a 1 millisecond window there, and its possible your programs time check is going from 4999 to 5001 and therefore missing the condition.

Machine: P4 2200, 1GB RAM, GeForce4 64MB, Audigy Platinum
http://www.breakbeat-terrorism.co.uk
(It's not all about the coding)
the_winch
23
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 22nd Jun 2003 23:37
You can do somthing like this.
FieldDoc
23
Years of Service
User Offline
Joined: 30th May 2003
Location: London, UK
Posted: 22nd Jun 2003 23:40
Thanks fallout...you were right! Thanks winch...I think i'll try to use that function

Life is like a penis:
When it's soft you can't beat it, when it's hard you get screwed.
TheCyborg
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Denmark
Posted: 22nd Jun 2003 23:41
That was almost the same.. just in another way, Winch...

No Page up yet --> http://thecyborg.lunaticsworld.com/
Fallout
23
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 23rd Jun 2003 02:34
No problemo doc.

Machine: P4 2200, 1GB RAM, GeForce4 64MB, Audigy Platinum
http://www.breakbeat-terrorism.co.uk
(It's not all about the coding)

Login to post a reply

Server time is: 2026-07-17 19:33:12
Your offset time is: 2026-07-17 19:33:12