summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/benchmark.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/benchmark.c b/src/benchmark.c
index 9a83318c3e..bcc12a9037 100644
--- a/src/benchmark.c
+++ b/src/benchmark.c
@@ -130,9 +130,7 @@ double stop_benchmark(struct benchmark_st *st, const char *metric,
gettime(&stop);
- lsecs = (stop.tv_sec * 1000 + stop.tv_nsec / (1000 * 1000) -
- (st->start.tv_sec * 1000 +
- st->start.tv_nsec / (1000 * 1000)));
+ lsecs = timespec_sub_ms(&stop, &st->start);
secs = lsecs;
secs /= 1000;