Lines Matching refs:clockid
50 char *clockstring(int clockid) in clockstring() argument
52 switch (clockid) { in clockstring()
98 int nanosleep_lat_test(int clockid, long long ns) in nanosleep_lat_test() argument
107 if (clock_gettime(clockid, &start)) in nanosleep_lat_test()
109 if (clock_nanosleep(clockid, 0, &target, NULL)) in nanosleep_lat_test()
115 clock_gettime(clockid, &start); in nanosleep_lat_test()
117 clock_nanosleep(clockid, 0, &target, NULL); in nanosleep_lat_test()
118 clock_gettime(clockid, &end); in nanosleep_lat_test()
127 clock_gettime(clockid, &start); in nanosleep_lat_test()
129 clock_nanosleep(clockid, TIMER_ABSTIME, &target, NULL); in nanosleep_lat_test()
130 clock_gettime(clockid, &end); in nanosleep_lat_test()
147 int clockid, ret; in main() local
149 for (clockid = CLOCK_REALTIME; clockid < NR_CLOCKIDS; clockid++) { in main()
152 if (clockid == CLOCK_PROCESS_CPUTIME_ID || in main()
153 clockid == CLOCK_THREAD_CPUTIME_ID || in main()
154 clockid == CLOCK_HWSPECIFIC) in main()
157 printf("nsleep latency %-26s ", clockstring(clockid)); in main()
161 ret = nanosleep_lat_test(clockid, length); in main()