| #include <time.h> | |
| #include <sys/time.h> | |
| #include "jacana_clock.h" | |
| /*---------------------------------------------------------------------------*/ | |
| int | |
| jacana_clock_init(void) | |
| { | |
| return 0; | |
| } | |
| /*---------------------------------------------------------------------------*/ | |
| unsigned | |
| jacana_clock_get(void) | |
| { | |
| struct timespec ts; | |
| clock_gettime(CLOCK_MONOTONIC, &ts); | |
| return ts.tv_sec * 1000 + ts.tv_nsec / 1000000; | |
| } | |
| /*---------------------------------------------------------------------------*/ |