diff options
Diffstat (limited to 'include/rin/time.h')
-rw-r--r-- | include/rin/time.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/rin/time.h b/include/rin/time.h index 9c8200f..d335e1f 100644 --- a/include/rin/time.h +++ b/include/rin/time.h @@ -23,6 +23,20 @@ #include <sys/time.h> +/* benchmarking related */ + +struct rin_bench_result { + struct timespec wall; + struct timeval system; + struct timeval user; + struct timeval total; +}; + +int rin_bench_start(void); +int rin_bench_stop(struct rin_bench_result *res); + +/* time data types related */ + struct timespec rin_time_add(const struct timespec * const a, const struct timespec * const b); struct timespec rin_time_sub(const struct timespec * const a, const struct timespec * const b); struct timespec rin_time_normalize(const struct timespec * const t); |