a****s 发帖数: 47 | 1 【 以下文字转载自 Programming 讨论区 】
【 原文由 abatis 所发表 】
Any alarm function that has precision of microsecond?
I have to use alarm function, and it seems I cannot use
usleep or nanosleep, cause the document says not
to mixing them.
It didn't say don't mix up alarm and pause, but I wonder
if alarm and pause are mixed, some problem will arise? | j***y 发帖数: 87 | 2
you can try setitimer for BSD based (4.2 or later) system,
or settimer for POSIX based system. They have higher resolution
than alarm, although the accuracy may be machine-dependent.
【在 a****s 的大作中提到】 : 【 以下文字转载自 Programming 讨论区 】 : 【 原文由 abatis 所发表 】 : Any alarm function that has precision of microsecond? : I have to use alarm function, and it seems I cannot use : usleep or nanosleep, cause the document says not : to mixing them. : It didn't say don't mix up alarm and pause, but I wonder : if alarm and pause are mixed, some problem will arise?
|
|