OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. |
3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
5 */ | 5 */ |
6 | 6 |
7 #include <inttypes.h> | 7 #include <inttypes.h> |
8 #include <stdio.h> | 8 #include <stdio.h> |
9 #include <time.h> | 9 #include <time.h> |
10 #include <sys/types.h> | 10 #include <sys/types.h> |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 fprintf(stderr, "IRT hook is not available\n"); | 77 fprintf(stderr, "IRT hook is not available\n"); |
78 return 1; | 78 return 1; |
79 } | 79 } |
80 | 80 |
81 errs += TimeTest(ti.clock_getres, CLOCK_REALTIME, | 81 errs += TimeTest(ti.clock_getres, CLOCK_REALTIME, |
82 "clock_getres on realtime clock failed", | 82 "clock_getres on realtime clock failed", |
83 "Realtime clock resolution"); | 83 "Realtime clock resolution"); |
84 errs += TimeTest(ti.clock_getres, CLOCK_MONOTONIC, | 84 errs += TimeTest(ti.clock_getres, CLOCK_MONOTONIC, |
85 "clock_getres on monotonic clock failed", | 85 "clock_getres on monotonic clock failed", |
86 "Monotonic clock resolution"); | 86 "Monotonic clock resolution"); |
| 87 errs += TimeTest(ti.clock_getres, CLOCK_PROCESS_CPUTIME_ID, |
| 88 "clock_getres on process CPU-time clock failed", |
| 89 "Process CPU-time clock resolution"); |
| 90 errs += TimeTest(ti.clock_getres, CLOCK_THREAD_CPUTIME_ID, |
| 91 "clock_getres on thread CPU-time clock failed", |
| 92 "Thread CPU-time clock resolution"); |
87 errs += TimeTest(ti.clock_gettime, CLOCK_REALTIME, | 93 errs += TimeTest(ti.clock_gettime, CLOCK_REALTIME, |
88 "clock_gettime on realtime clock failed", | 94 "clock_gettime on realtime clock failed", |
89 "Realtime clock value"); | 95 "Realtime clock value"); |
90 errs += TimeTest(ti.clock_gettime, CLOCK_MONOTONIC, | 96 errs += TimeTest(ti.clock_gettime, CLOCK_MONOTONIC, |
91 "clock_gettime on monotonic clock failed", | 97 "clock_gettime on monotonic clock failed", |
92 "Monotonic clock value"); | 98 "Monotonic clock value"); |
| 99 errs += TimeTest(ti.clock_gettime, CLOCK_PROCESS_CPUTIME_ID, |
| 100 "clock_gettime on process CPU-time clock failed", |
| 101 "Process CPU-time clock value"); |
| 102 errs += TimeTest(ti.clock_gettime, CLOCK_THREAD_CPUTIME_ID, |
| 103 "clock_gettime on thread CPU-time clock failed", |
| 104 "Thread CPU-time clock value"); |
93 return errs; | 105 return errs; |
94 } | 106 } |
OLD | NEW |