diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2013-03-19 21:57:50 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2013-03-19 21:59:19 +0100 |
commit | c5ab7796ec3aa95960615ea7a3b15fe3e3277903 (patch) | |
tree | 2a4f2f35def6129960f3bdca1d4ad8984eefd9f0 /src | |
parent | d9fbe11fa60e48f69aa8781258138ceab4190dfe (diff) | |
download | gnutls-c5ab7796ec3aa95960615ea7a3b15fe3e3277903.tar.gz |
use clock_gettime when we can
Diffstat (limited to 'src')
-rw-r--r-- | src/benchmark.c | 5 |
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; |