19 lines771 bytes
1#ifndef _TIMESPEC_UTILS_H
2#define _TIMESPEC_UTILS_H
3#include <stdint.h>
4
5struct timespec;
6
7static inline struct timespec timespec_from_int64_ns(int64_t time);
8static inline int64_t int64_ns_from_timespec(struct timespec time);
9static inline bool timespec_eq(struct timespec a, struct timespec b);
10static inline bool timespec_ne(struct timespec a, struct timespec b);
11static inline bool timespec_lt(struct timespec a, struct timespec b);
12static inline bool timespec_lte(struct timespec a, struct timespec b);
13static inline bool timespec_gt(struct timespec a, struct timespec b);
14static inline bool timespec_gte(struct timespec a, struct timespec b);
15static inline struct timespec timespec_sub(struct timespec a, struct timespec b);
16
17#include "timespec_utils.def.h"
18#endif
19