From 516ce8a885e2d14422a5cf58b0cf3a7bc3e817f3 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 12 Nov 2014 14:33:45 +0100 Subject: benchmark with cpu-time MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/benchmark.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/benchmark.c b/src/benchmark.c index 17b2e4b..0c636e1 100644 --- a/src/benchmark.c +++ b/src/benchmark.c @@ -99,7 +99,7 @@ int main(void) return perror("libkeccak_state_initialise"), 1; /* Get start-time. */ - if (clock_gettime(CLOCK_MONOTONIC_RAW, &start) < 0) + if (clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &start) < 0) return perror("clock_gettime"), 1; /* Run benchmarking loop. */ @@ -137,7 +137,7 @@ int main(void) } /* Get end-time. */ - if (clock_gettime(CLOCK_MONOTONIC_RAW, &end) < 0) + if (clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &end) < 0) return perror("clock_gettime"), -1; /* Print execution-time. */ -- cgit v1.2.3-70-g09d2