| 67 | }; |
| 68 | |
| 69 | static inline void start_timer(timer_data * timer) { |
| 70 | timespec ts; |
| 71 | clock_gettime(CLOCK_MONOTONIC, &ts); |
| 72 | timer->start = (long long) ts.tv_sec * 1000000000LL + ts.tv_nsec; |
| 73 | } |
| 74 | |
| 75 | // returns the duration in ns |
| 76 | static inline long long stop_timer(timer_data * timer) { |