bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

sleep in microsecond or nanosecond


From: Da Zheng
Subject: sleep in microsecond or nanosecond
Date: Tue, 06 Jul 2010 08:44:30 +0800
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.10) Gecko/20100512 Thunderbird/3.0.5

Hello,

I need a program to sleep in several microseconds, but neither nanosleep() nor
usleep() can work. They sleep at least 10ms. So it seems the only option is to
use loop and Linux kernel does so as well for udelay() and ndelay(). Then I need
high resolution timing. I think I can use TSC, but it's better to be system
independent. There is clock_gettime() in POSIX, but surprisingly it's not
implemented in glibc in Hurd. Any suggestions?

Best regards,
Zheng Da



reply via email to

[Prev in Thread] Current Thread [Next in Thread]