summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2013-03-19 21:57:50 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2013-03-19 21:59:19 +0100
commitc5ab7796ec3aa95960615ea7a3b15fe3e3277903 (patch)
tree2a4f2f35def6129960f3bdca1d4ad8984eefd9f0 /src
parentd9fbe11fa60e48f69aa8781258138ceab4190dfe (diff)
downloadgnutls-c5ab7796ec3aa95960615ea7a3b15fe3e3277903.tar.gz
use clock_gettime when we can
Diffstat (limited to 'src')
-rw-r--r--src/benchmark.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/benchmark.c b/src/benchmark.c
index ea19764160..d65b6ab0bb 100644
--- a/src/benchmark.c
+++ b/src/benchmark.c
@@ -26,6 +26,11 @@
#include <unistd.h>
#include "benchmark.h"
+#if defined(HAVE_CLOCK_GETTIME)
+# undef gettime
+# define gettime(x) clock_gettime(CLOCK_PROCESS_CPUTIME_ID, x)
+#endif
+
#define BSECS 5
int benchmark_must_finish = 0;