blob: ffa97f2304580a7fdac51bb7dcf51c4f40e64cbc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#ifndef H_RED_TIME
#define H_RED_TIME
#include <time.h>
static inline uint64_t red_now(void)
{
struct timespec time;
clock_gettime(CLOCK_MONOTONIC, &time);
return ((uint64_t) time.tv_sec) * 1000000000 + time.tv_nsec;
}
#endif
|