summaryrefslogtreecommitdiffstats
path: root/utils/bench.h
diff options
context:
space:
mode:
Diffstat (limited to 'utils/bench.h')
-rw-r--r--utils/bench.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/utils/bench.h b/utils/bench.h
index a04996b..28e5221 100644
--- a/utils/bench.h
+++ b/utils/bench.h
@@ -30,24 +30,24 @@ typedef struct timespec BenchmarkTime;
static inline double
bench_elapsed_s(const BenchmarkTime* start, const BenchmarkTime* end)
{
- return ((end->tv_sec - start->tv_sec)
- + ((end->tv_nsec - start->tv_nsec) * 0.000000001));
+ return ((end->tv_sec - start->tv_sec) +
+ ((end->tv_nsec - start->tv_nsec) * 0.000000001));
}
static inline BenchmarkTime
bench_start(void)
{
- BenchmarkTime start_t;
- clock_gettime(CLOCK_REALTIME, &start_t);
- return start_t;
+ BenchmarkTime start_t;
+ clock_gettime(CLOCK_REALTIME, &start_t);
+ return start_t;
}
static inline double
bench_end(const BenchmarkTime* start_t)
{
- BenchmarkTime end_t;
- clock_gettime(CLOCK_REALTIME, &end_t);
- return bench_elapsed_s(start_t, &end_t);
+ BenchmarkTime end_t;
+ clock_gettime(CLOCK_REALTIME, &end_t);
+ return bench_elapsed_s(start_t, &end_t);
}
-#endif /* BENCH_H */
+#endif /* BENCH_H */