From 29e9b23500d101f01988a33e8f1a6aaab39d5f7d Mon Sep 17 00:00:00 2001 From: lloyd Date: Tue, 1 Dec 2009 15:36:30 +0000 Subject: Most files including actually just needed Clean up implementation of calendar_value() a bit --- src/entropy/hres_timer/hres_timer.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src/entropy/hres_timer') diff --git a/src/entropy/hres_timer/hres_timer.cpp b/src/entropy/hres_timer/hres_timer.cpp index 74ea801c4..0f75583ef 100644 --- a/src/entropy/hres_timer/hres_timer.cpp +++ b/src/entropy/hres_timer/hres_timer.cpp @@ -7,7 +7,6 @@ #include #include -#include #if defined(BOTAN_TARGET_OS_IS_WINDOWS) #include -- cgit v1.2.3 From 9559e323cb631af4e154f5fd30ff2927748817ed Mon Sep 17 00:00:00 2001 From: lloyd Date: Tue, 1 Dec 2009 17:28:19 +0000 Subject: 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. --- src/build-data/os/windows.txt | 1 + src/entropy/hres_timer/hres_timer.cpp | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/entropy/hres_timer') diff --git a/src/build-data/os/windows.txt b/src/build-data/os/windows.txt index e72931c98..59e3ec072 100644 --- a/src/build-data/os/windows.txt +++ b/src/build-data/os/windows.txt @@ -12,6 +12,7 @@ install_cmd_exec "copy" win32_virtual_lock +win32_query_perf_counter 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 #include -#if defined(BOTAN_TARGET_OS_IS_WINDOWS) +#if defined(BOTAN_TARGET_OS_HAS_QUERY_PERF_COUNTER) #include #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); -- cgit v1.2.3