定义在“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获得和设置。
本文介绍了Linux内核中定义的各种时钟源类型及其特点,包括系统实时时钟、单调时钟、进程CPU时间等,并说明了如何通过系统调用获取和设置这些时钟的时间。
1323

被折叠的 条评论
为什么被折叠?



