StupidBeauty
Read times:452Posted at:Fri Nov 4 17:45:09 2011

转载:请问 usleep() sleep() 有何区别???

http://www.lslnet.com/linux/dosc1/44/linux-308370.htm

亮点:

man usleep
....
NOTES
The interaction of this function with SIGALRM and other timer functions such as
sleep(), alarm(), setitimer(), nanosleep() is unspecified. This function is
obsolete. Use nanosleep(2) or setitimer(2) instead.

nanosleep: 精度比较高,没有usleep的问题,也是POSIX要求的

转载:请问 usleep() sleep() 有何区别???

http://www.lslnet.com/linux/dosc1/44/linux-308370.htm

亮点:

man usleep
....
NOTES
The interaction of this function with SIGALRM and other timer functions such as
sleep(), alarm(), setitimer(), nanosleep() is unspecified. This function is
obsolete. Use nanosleep(2) or setitimer(2) instead.

nanosleep: 精度比较高,没有usleep的问题,也是POSIX要求的

Your opinions
Your name:Email:Website url:Opinion content:
- no title specified

HxLauncher: Launch Android applications by voice commands