blob: 250efc427eb47c26fa1e76fd1875f5087f3888e7 [file] [log] [blame]
b.liuced8dd02024-06-28 13:28:29 +08001#include <time.h>
2#include <sys/time.h>
3
4#include "jacana_clock.h"
5
6/*---------------------------------------------------------------------------*/
7int
8jacana_clock_init(void)
9{
10 return 0;
11}
12/*---------------------------------------------------------------------------*/
13unsigned
14jacana_clock_get(void)
15{
16 struct timespec ts;
17
18 clock_gettime(CLOCK_MONOTONIC, &ts);
19
20 return ts.tv_sec * 1000 + ts.tv_nsec / 1000000;
21}
22/*---------------------------------------------------------------------------*/