LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   millisecond pause (https://www.linuxquestions.org/questions/programming-9/millisecond-pause-102297/)

oopicmaster 10-09-2003 08:32 PM

millisecond pause
 
In Windows programming, it is very easy to pause a thread down to the millisecond level via the sleep(ms) command.

How is this done under linux? Ive seen the pause(), and alarm() Linux calls but both of these have 1 second resolutions. setitimer() doesnt seem to work either.

Kumar 10-10-2003 12:16 AM

Hi ,
How about trying nanosleep() ? It's defined in time.h. use man pages for more info.


All times are GMT -5. The time now is 10:41 PM.