aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-11-12 14:33:45 +0100
committerMattias Andrée <maandree@operamail.com>2014-11-12 14:33:45 +0100
commit516ce8a885e2d14422a5cf58b0cf3a7bc3e817f3 (patch)
tree024e653a45968a1432cd0d34555c71ac9ff7663a /src
parentadd secure variants of update and digest (diff)
downloadlibkeccak-516ce8a885e2d14422a5cf58b0cf3a7bc3e817f3.tar.gz
libkeccak-516ce8a885e2d14422a5cf58b0cf3a7bc3e817f3.tar.bz2
libkeccak-516ce8a885e2d14422a5cf58b0cf3a7bc3e817f3.tar.xz
benchmark with cpu-time
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src')
-rw-r--r--src/benchmark.c4
1 files 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. */