summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarcus Brinkmann <mb@g10code.com>2006-07-04 13:08:57 +0000
committerMarcus Brinkmann <mb@g10code.com>2006-07-04 13:08:57 +0000
commitb2e8caf72211280885cdadc546e08029a6eb6c8e (patch)
treee55d75fbed87871c55dc24f20c0f459e9d178e40 /tests
parent552f4bb485eceedf485a8fbd41895e966fab889c (diff)
downloadlibgcrypt-b2e8caf72211280885cdadc546e08029a6eb6c8e.tar.gz
2006-07-04 Marcus Brinkmann <marcus@g10code.de>
* ath.c: Avoid warning about double defined type byte and other hacks to let it build for W32 (backported from LIBGCRYPT-1-2-BRANCH). * ath.h, gcrypt.h, tests/benchmark.c, src/types.h: Likewise.
Diffstat (limited to 'tests')
-rw-r--r--tests/benchmark.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/benchmark.c b/tests/benchmark.c
index 362ecec3..a4e24b1a 100644
--- a/tests/benchmark.c
+++ b/tests/benchmark.c
@@ -24,7 +24,9 @@
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
+#ifndef _WIN32
#include <sys/times.h>
+#endif
#include <gcrypt.h>
#define PGM "benchmark"
@@ -229,19 +231,27 @@ static clock_t started_at, stopped_at;
static void
start_timer (void)
{
+#ifdef _WIN32
+ started_at = stopped_at = clock ();
+#else
struct tms tmp;
times (&tmp);
started_at = stopped_at = tmp.tms_utime;
+#endif
}
static void
stop_timer (void)
{
+#ifdef _WIN32
+ stopped_at = clock ();
+#else
struct tms tmp;
times (&tmp);
stopped_at = tmp.tms_utime;
+#endif
}
static const char *