On my mac, sleep() takes as argument a number and this number is the number of SECONDS that the process will sleep.. is there a way to specify some milliseconds like sleep() for windows?
If I put 0.x it will be rounded to 0 :(
Printable View
On my mac, sleep() takes as argument a number and this number is the number of SECONDS that the process will sleep.. is there a way to specify some milliseconds like sleep() for windows?
If I put 0.x it will be rounded to 0 :(
great, let me try
nanosleep() as well.
But be aware - the time specified for both of these is the MINIMUM. If another process got the cpu while your process was away, your process may not get it back after waking up until a full quantum (time slice) has elapsed. ie., longer sleep time than you wanted.