diff options
Diffstat (limited to 'tests/benchmark.c')
-rw-r--r-- | tests/benchmark.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/benchmark.c b/tests/benchmark.c index f3a110bb..ab2aeb29 100644 --- a/tests/benchmark.c +++ b/tests/benchmark.c @@ -32,6 +32,7 @@ #ifdef _GCRYPT_IN_LIBGCRYPT # include "../src/gcrypt.h" +# include "../compat/libcompat.h" #else # include <gcrypt.h> #endif @@ -290,9 +291,15 @@ static void start_timer (void) { #ifdef _WIN32 +#ifdef __MINGW32CE__ + GetThreadTimes (GetCurrentThread (), + &started_at.creation_time, &started_at.exit_time, + &started_at.kernel_time, &started_at.user_time); +#else GetProcessTimes (GetCurrentProcess (), &started_at.creation_time, &started_at.exit_time, &started_at.kernel_time, &started_at.user_time); +#endif stopped_at = started_at; #else struct tms tmp; @@ -306,9 +313,15 @@ static void stop_timer (void) { #ifdef _WIN32 +#ifdef __MINGW32CE__ + GetThreadTimes (GetCurrentThread (), + &stopped_at.creation_time, &stopped_at.exit_time, + &stopped_at.kernel_time, &stopped_at.user_time); +#else GetProcessTimes (GetCurrentProcess (), &stopped_at.creation_time, &stopped_at.exit_time, &stopped_at.kernel_time, &stopped_at.user_time); +#endif #else struct tms tmp; |