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.

Newcomers DBPro Corner / DIFFERENCES BETWEN WAIT & SLEEP

Author
Message
naxox
18
Years of Service
User Offline
Joined: 16th Mar 2006
Location:
Posted: 16th Mar 2006 15:06
Hello, I´m newcomer!

I would like to know what is the differences between the command WAIT ant the command SLEEP.

I would like to use DBP to make 'demo scene's and its usually to synchronize with the music. What is better WAIT or SLEEP? the differences?

THANK YOU VERY MUCH

I´m from Spain
RavageFX
18
Years of Service
User Offline
Joined: 20th Jan 2006
Location:
Posted: 16th Mar 2006 19:30
sleep makes it wait for a specified amout of time and when you use wait you can make it wait for a certain key

Dont eat a cheese at night. Or you'll meet me.
Hamish McHaggis
21
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 16th Mar 2006 19:38
As far as I can tell there is no difference at all. "Wait" is the more commonly used version, "sleep" was probably added as it is also a common command used in earlier BASICs. The command "wait key" waits for any key to be pressed (not a specific one), but is a completely separate command from "wait".

naxox
18
Years of Service
User Offline
Joined: 16th Mar 2006
Location:
Posted: 16th Mar 2006 21:01
Don´t confuse, i specified that the command is 'WAIT' and not 'WAIT KEY'.

My question is if there are really any difference between this commands('WAIT' and 'SLEEP'). And if there are not, there are a bug

If they are the same one command it must be deleted.

Thanks for your replys.

I´m from Spain
Acolyte Entertainment
19
Years of Service
User Offline
Joined: 28th Dec 2004
Location: Oregon, US
Posted: 19th Mar 2006 23:24
Lol. wait is just WAITING untell you tell it to start up again, the computer is still working to keep it waiting.
SLEEP makes the computer fall asleep and quit working. so if you are trying to stop almost all movement within your system use Sleep

driftman
19
Years of Service
User Offline
Joined: 7th Aug 2005
Location: Somewhere Outside of Sanity
Posted: 20th Mar 2006 01:24
they are basically the same commands, only sleep is called from kernel32.dll, and wait is a function that was designed for use with keystrokes and mouseclicks, as well as timed based waiting.
i might be wrong, but that's what i think it is.

I have a lil' white jacket that lets me hug myself forever.
naxox
18
Years of Service
User Offline
Joined: 16th Mar 2006
Location:
Posted: 20th Mar 2006 15:04
Thanks a lot snowfall and driftman. I know the differences but for demo scene, what is better WAIT or SLEEP.

If I´m moving some models and i need that in 30 seconds appears other model what is better, WAIT OR SLEEP?

Someone know some code snippet for demos??

I´m from Spain
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 21st Mar 2006 00:49
Why not experiment for yourself, first use WAIT and get the average frame rate, then use SLEEP and get the average frame rate. While you're at it, stop raping your caps lock button in the thread titles.

Mr X
19
Years of Service
User Offline
Joined: 25th Sep 2005
Location: Universe, milkyway, sol-system, Earth...
Posted: 23rd Mar 2006 13:22 Edited at: 23rd Mar 2006 13:23
Quote: "While you're at it, stop raping your caps lock button in the thread titles."


I learnd that it was considered rude the hard way (accually not that hard, but I got some complains about it).
Acolyte Entertainment
19
Years of Service
User Offline
Joined: 28th Dec 2004
Location: Oregon, US
Posted: 23rd Mar 2006 16:46
naxox. hmmm, when i think about it you would get a higher frame rate from sleep.
becuase its turning off more of the computer than wait. wait just pauses so it would make the frame rate lower. try them both and see i guess.

empty
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 23rd Mar 2006 17:59 Edited at: 23rd Mar 2006 17:59
As I pointed out in an earlier thread, both SLEEP and WAIT point use the same function, So they're absolutely identical.

Login to post a reply

Server time is: 2024-11-27 01:50:50
Your offset time is: 2024-11-27 01:50:50