Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

alternative to sleep(); needed 1

Status
Not open for further replies.

jbpelletier

Programmer
Sep 8, 2001
232
CA
Hi,

Usualy i was using sleep(x) where x is the number of milisec but i dunno if its win2000 or my compiler(borland) but it looks like sleep(x) now use x as the number of secondes..

i need to do a delay less than 1 seconde..

what to use....?

tanx
 
What if you type Sleep(x) with an uppercase S ?

/JOlesen
 
//Error.....
Sleep(x); //with capital S, dont exist (well not in dos.h)

whats is the name of the header file?
 
>> whats is the name of the header file?

Winbase.h

It's a Windows API not a Borland API.

-pete
 
Sleep is declared in winbase.h.
Simply #include <windows.h>

/JOlesen
 
hey try usleep(x) where x is in microseconds.

for example usleep(500000) will sleep for 0.5 seconds...

i don't know if this will work.
it's just an idea.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top