summaryrefslogtreecommitdiffstats
path: root/benchmark/bench.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-12-31 15:15:05 +0100
committerDavid Robillard <d@drobilla.net>2020-12-31 15:21:29 +0100
commit741c3349b09c8774fcd013e3bdd7d9e7f6b470ce (patch)
treea941f6567b85255570e5492f3c66a842704ba9f7 /benchmark/bench.h
parent841c766d86dc35ab37c4fef8ec866d06c41bc383 (diff)
downloadzix-741c3349b09c8774fcd013e3bdd7d9e7f6b470ce.tar.gz
zix-741c3349b09c8774fcd013e3bdd7d9e7f6b470ce.tar.bz2
zix-741c3349b09c8774fcd013e3bdd7d9e7f6b470ce.zip
Format all code with clang-format
Diffstat (limited to 'benchmark/bench.h')
-rw-r--r--benchmark/bench.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/benchmark/bench.h b/benchmark/bench.h
index 716601b..3fc907f 100644
--- a/benchmark/bench.h
+++ b/benchmark/bench.h
@@ -22,23 +22,22 @@
static inline double
elapsed_s(const struct timespec* start, const struct timespec* end)
{
- return ( (double)(end->tv_sec - start->tv_sec)
- + ((double)(end->tv_nsec - start->tv_nsec) * 0.000000001) );
+ return ((double)(end->tv_sec - start->tv_sec) +
+ ((double)(end->tv_nsec - start->tv_nsec) * 0.000000001));
}
static inline struct timespec
bench_start(void)
{
- struct timespec start_t;
- clock_gettime(CLOCK_MONOTONIC, &start_t);
- return start_t;
+ struct timespec start_t;
+ clock_gettime(CLOCK_MONOTONIC, &start_t);
+ return start_t;
}
static inline double
bench_end(const struct timespec* start_t)
{
- struct timespec end_t;
- clock_gettime(CLOCK_MONOTONIC, &end_t);
- return elapsed_s(start_t, &end_t);
+ struct timespec end_t;
+ clock_gettime(CLOCK_MONOTONIC, &end_t);
+ return elapsed_s(start_t, &end_t);
}
-