Wait command in c++??

Started by
6 comments, last by dragov 21 years ago
What is the wait command in c++?? ~-~-~-~-~-~-~-~-~ Butterfly Corp
Advertisement
sleep( time );
don''t piss on an electrical fence
Thank you for you fast answer!

~-~-~-~-~-~-~-~-~
Butterfly Corp
quote:Original post by _Corrupt_
sleep( time );


sleep( milliseconds ) ;


.lick
hmmmm

i thought it was like this:

sleep( seconds )

and

Sleep( milliseconds ) <- needs windows.h

Could be wrong though
don''t piss on an electrical fence
Thank to all of you.

~-~-~-~-~-~-~-~-~
Butterfly Corp

   i thought ill just post something here, im bored again   
Yes stuff does do stuff... i dunno
I would suggest something like:


#include <windows.h> // you must include windows.h to use Sleep()
inline void Wait(int seconds)
{
Sleep(seconds * 1000);
}


You can create other functions, if necessary, to make your code neater for Sleep() - for example:

WaitSecs(), WaitMins(), WaitHrs(), etc.

[ Google || Start Here || ACCU || MSDN || STL || GameCoding || BarrysWorld || E-Mail Me ]
[ Google || Start Here || ACCU || STL || Boost || MSDN || GotW || CUJ || MSVC++ Library Fixes || BarrysWorld || [email=lektrix@barrysworld.com]E-Mail Me[/email] ]

This topic is closed to new replies.

Advertisement