summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-08-13 17:25:42 +0200
committerDavid Robillard <d@drobilla.net>2020-08-13 17:25:42 +0200
commit5139ab9b1ad4d58609f078f24bd2d013b9905cdb (patch)
tree33a06a1db331a8aa98bad5172024daa2160e075b /test
parent2a497984e25a6776a38d68eb7982c2bd8174e93b (diff)
downloadzix-5139ab9b1ad4d58609f078f24bd2d013b9905cdb.tar.gz
zix-5139ab9b1ad4d58609f078f24bd2d013b9905cdb.tar.bz2
zix-5139ab9b1ad4d58609f078f24bd2d013b9905cdb.zip
Fix Wno-implicit-int-float-conversion warning in benchmark
Diffstat (limited to 'test')
-rw-r--r--test/bench.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/bench.h b/test/bench.h
index 3575633..716601b 100644
--- a/test/bench.h
+++ b/test/bench.h
@@ -22,8 +22,8 @@
static inline double
elapsed_s(const struct timespec* start, const struct timespec* end)
{
- return ( (end->tv_sec - start->tv_sec)
- + ((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