[svn] gcry - r1165 - trunk/tests
svn author marcus
cvs at cvs.gnupg.org
Tue Jul 4 15:08:58 CEST 2006
Author: marcus
Date: 2006-07-04 15:08:57 +0200 (Tue, 04 Jul 2006)
New Revision: 1165
Modified:
trunk/tests/benchmark.c
Log:
2006-07-04 Marcus Brinkmann <marcus at 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.
Modified: trunk/tests/benchmark.c
===================================================================
--- trunk/tests/benchmark.c 2006-07-04 13:06:04 UTC (rev 1164)
+++ trunk/tests/benchmark.c 2006-07-04 13:08:57 UTC (rev 1165)
@@ -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 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 *
More information about the Gnupg-commits
mailing list