diff options
author | lloyd <[email protected]> | 2009-12-01 17:28:19 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2009-12-01 17:28:19 +0000 |
commit | 9559e323cb631af4e154f5fd30ff2927748817ed (patch) | |
tree | 6ededb80d496017a58ba4b862e33c554e54c4e57 /src/entropy/hres_timer | |
parent | 29e9b23500d101f01988a33e8f1a6aaab39d5f7d (diff) |
Instead of checking for Windows generically before using QueryPerformanceCounter,
check a feature macro named BOTAN_OS_HAS_QUERY_PERF_COUNTER, and set the
same via configure.py for Windows builds.
Diffstat (limited to 'src/entropy/hres_timer')
-rw-r--r-- | src/entropy/hres_timer/hres_timer.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/entropy/hres_timer/hres_timer.cpp b/src/entropy/hres_timer/hres_timer.cpp index 0f75583ef..e6cc102ed 100644 --- a/src/entropy/hres_timer/hres_timer.cpp +++ b/src/entropy/hres_timer/hres_timer.cpp @@ -8,7 +8,7 @@ #include <botan/hres_timer.h> #include <botan/cpuid.h> -#if defined(BOTAN_TARGET_OS_IS_WINDOWS) +#if defined(BOTAN_TARGET_OS_HAS_QUERY_PERF_COUNTER) #include <windows.h> #endif @@ -19,8 +19,7 @@ namespace Botan { */ void High_Resolution_Timestamp::poll(Entropy_Accumulator& accum) { - // If Windows, grab the Performance Counter (usually TSC or PIT) -#if defined(BOTAN_TARGET_OS_IS_WINDOWS) +#if defined(BOTAN_TARGET_OS_HAS_QUERY_PERF_COUNTER) LARGE_INTEGER tv; ::QueryPerformanceCounter(&tv); accum.add(tv.QuadPart, 0); |