Hello problem in usleep function on Linux
msawant-9o2+y0l0l4b/[email protected]
| Newsgroups | gmane.linux.admin.managers |
|---|---|
| Message-ID | <[email protected]> |
Hi Folks, I am trying to use a 'C' component on operating system Red Hat Linux version 2. In the 'C' component, I am using the usleep (microsleep) function for putting a sleep of 1000 microseconds (1 ms). But the granularity of usleep on Linux being 10ms, the delay caused between every iteration used in the 'C' program is 10ms+, which is undesirable. The same problem is faced in the nanosleep function. Has any of you guys used a custom defined function on Linux, that introduces a sleep of 1 to 5 ms (lesser than 10 ms). Can you guide me on how to achieve a delay of that much interval (> 10ms). Thanking you. Good Day. Mandar _______________________________________________ LinuxManagers mailing list - http://www.linuxmanagers.org submissions: LinuxManagers-35TzE1X9F6582KRnZfj+bdi2O/[email protected] subscribe/unsubscribe: http://www.linuxmanagers.org/mailman/listinfo/linuxmanagers