From af81088cf938f388dac201a90b8ef221ee82aef6 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Thu, 6 Oct 2016 17:42:41 +0200 Subject: change timer functionality to use clock_monotonic_raw --- include/gensvm_timer.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include/gensvm_timer.h') diff --git a/include/gensvm_timer.h b/include/gensvm_timer.h index 563576b..5dd4dcb 100644 --- a/include/gensvm_timer.h +++ b/include/gensvm_timer.h @@ -15,7 +15,10 @@ // includes #include "gensvm_globals.h" +/// Timer macro for easily recording time +#define Timer(spec) clock_gettime(CLOCK_MONOTONIC_RAW, &spec) + // function declarations -double gensvm_elapsed_time(clock_t s_time, clock_t e_time); +double gensvm_elapsed_time(struct timespec *start, struct timespec *stop); #endif -- cgit v1.2.3