POSIX.1b定义的几种时钟类型

定义在“include/linux/time.h”中:

 

       CLOCK_REALTIME
              Systemwide realtime clock.

       CLOCK_MONOTONIC
              Represents monotonic time. Cannot be set.

       CLOCK_PROCESS_CPUTIME_ID
              High resolution per-process timer.

       CLOCK_THREAD_CPUTIME_ID
              Thread-specific timer.

       CLOCK_REALTIME_HR
              High resolution version of CLOCK_REALTIME.

       CLOCK_MONOTONIC_HR
              High resolution version of CLOCK_MONOTONIC.

 

如无特殊注明,这些始终可以通过clock_gettime, clock_settime获得和设置。

你可能感兴趣的:(thread)