blob: 27a9f464722b1cfd1f35f33e6e0223bc82eb4018 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#include <assert.h>
#include <time.h>
int main()
{
struct timespec ts;
// supported clocks
assert(clock_getres(CLOCK_REALTIME, &ts) == 0);
assert(clock_getres(CLOCK_MONOTONIC, &ts) == 0);
assert(clock_getres(CLOCK_PROCESS_CPUTIME_ID, &ts) == 0);
assert(clock_getres(CLOCK_THREAD_CPUTIME_ID, &ts) == 0);
}
|