diff options
author | Werner Koch <wk@gnupg.org> | 2010-01-21 21:36:43 +0000 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2010-01-21 21:36:43 +0000 |
commit | b299da47a6f733c2e28fd98b8f2e19261f3b2608 (patch) | |
tree | daf8da2d3dcbe142e03010fc9dc643b02c280a5b /tests/benchmark.c | |
parent | c9a727088a4a763ff368e4f10d98d3a0c3a8d3b2 (diff) | |
download | libgcrypt-b299da47a6f733c2e28fd98b8f2e19261f3b2608.tar.gz |
Support WindowsCE.
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; |