diff options
author | lloyd <[email protected]> | 2008-09-28 19:29:24 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-09-28 19:29:24 +0000 |
commit | 9bcfe627321ddc81691b835dffaa6324ac4684a4 (patch) | |
tree | fe5e8ae9813b853549558b59833022e87e83981b /src/timer/win32_query_perf_ctr | |
parent | 9822a701516396b7de4e41339faecd48ff8dc8ff (diff) |
Move all modules into src/ directory
Diffstat (limited to 'src/timer/win32_query_perf_ctr')
-rw-r--r-- | src/timer/win32_query_perf_ctr/modinfo.txt | 20 | ||||
-rw-r--r-- | src/timer/win32_query_perf_ctr/tm_win32.cpp | 21 | ||||
-rw-r--r-- | src/timer/win32_query_perf_ctr/tm_win32.h | 24 |
3 files changed, 65 insertions, 0 deletions
diff --git a/src/timer/win32_query_perf_ctr/modinfo.txt b/src/timer/win32_query_perf_ctr/modinfo.txt new file mode 100644 index 000000000..74c4a59ea --- /dev/null +++ b/src/timer/win32_query_perf_ctr/modinfo.txt @@ -0,0 +1,20 @@ +realname "Win32 Timer" + +define TIMER_WIN32 +modset win32 + +load_on auto + +<add> +tm_win32.cpp +tm_win32.h +</add> + +<os> +cygwin +windows +</os> + +<libs> +windows -> user32 +</libs> diff --git a/src/timer/win32_query_perf_ctr/tm_win32.cpp b/src/timer/win32_query_perf_ctr/tm_win32.cpp new file mode 100644 index 000000000..58f7b0f55 --- /dev/null +++ b/src/timer/win32_query_perf_ctr/tm_win32.cpp @@ -0,0 +1,21 @@ +/************************************************* +* Win32 Timer Source File * +* (C) 1999-2007 Jack Lloyd * +*************************************************/ + +#include <botan/tm_win32.h> +#include <windows.h> + +namespace Botan { + +/************************************************* +* Get the timestamp * +*************************************************/ +u64bit Win32_Timer::clock() const + { + LARGE_INTEGER tv; + ::QueryPerformanceCounter(&tv); + return tv.QuadPart; + } + +} diff --git a/src/timer/win32_query_perf_ctr/tm_win32.h b/src/timer/win32_query_perf_ctr/tm_win32.h new file mode 100644 index 000000000..67b045e78 --- /dev/null +++ b/src/timer/win32_query_perf_ctr/tm_win32.h @@ -0,0 +1,24 @@ +/************************************************* +* Win32 Timer Header File * +* (C) 1999-2007 Jack Lloyd * +*************************************************/ + +#ifndef BOTAN_TIMER_WIN32_H__ +#define BOTAN_TIMER_WIN32_H__ + +#include <botan/timers.h> + +namespace Botan { + +/************************************************* +* Win32 Timer * +*************************************************/ +class Win32_Timer : public Timer + { + public: + u64bit clock() const; + }; + +} + +#endif |