提交 e1da54e5 编写于 作者: B Bernard Xiong

[pthreads] Add CLOCK_CPUTIME_ID/CLOCK_MONOTONIC clock_id

上级 f746c6e5
...@@ -307,7 +307,20 @@ struct sigevent ...@@ -307,7 +307,20 @@ struct sigevent
#define NANOSECOND_PER_TICK (NANOSECOND_PER_SECOND / RT_TICK_PER_SECOND) #define NANOSECOND_PER_TICK (NANOSECOND_PER_SECOND / RT_TICK_PER_SECOND)
#ifndef CLOCK_REALTIME #ifndef CLOCK_REALTIME
#define CLOCK_REALTIME 0 #define CLOCK_REALTIME 1
#endif
#define CLOCK_CPUTIME_ID 2
#ifndef CLOCK_PROCESS_CPUTIME_ID
#define CLOCK_PROCESS_CPUTIME_ID CLOCK_CPUTIME_ID
#endif
#ifndef CLOCK_THREAD_CPUTIME_ID
#define CLOCK_THREAD_CPUTIME_ID CLOCK_CPUTIME_ID
#endif
#ifndef CLOCK_MONOTONIC
#define CLOCK_MONOTONIC 4
#endif #endif
int clock_getres (clockid_t clockid, struct timespec *res); int clock_getres (clockid_t clockid, struct timespec *res);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册