diff options
author | lloyd <lloyd@randombit.net> | 2006-05-18 18:33:19 +0000 |
---|---|---|
committer | lloyd <lloyd@randombit.net> | 2006-05-18 18:33:19 +0000 |
commit | a2c99d3270eb73ef2db5704fc54356c6b75096f8 (patch) | |
tree | ad3d6c4fcc8dd0f403f8105598943616246fe172 /modules/tm_win32 |
Initial checkin1.5.6
Diffstat (limited to 'modules/tm_win32')
-rw-r--r-- | modules/tm_win32/modinfo.txt | 15 | ||||
-rw-r--r-- | modules/tm_win32/tm_win32.cpp | 21 | ||||
-rw-r--r-- | modules/tm_win32/tm_win32.h | 24 |
3 files changed, 60 insertions, 0 deletions
diff --git a/modules/tm_win32/modinfo.txt b/modules/tm_win32/modinfo.txt new file mode 100644 index 000000000..db9c4d9b8 --- /dev/null +++ b/modules/tm_win32/modinfo.txt @@ -0,0 +1,15 @@ +realname "Win32 Timer" + +define TIMER_WIN32 + +add_file tm_win32.cpp +add_file tm_win32.h + +<os> +cygwin +windows +</os> + +<libs> +windows -> user32 +</libs> diff --git a/modules/tm_win32/tm_win32.cpp b/modules/tm_win32/tm_win32.cpp new file mode 100644 index 000000000..1f4a33bf4 --- /dev/null +++ b/modules/tm_win32/tm_win32.cpp @@ -0,0 +1,21 @@ +/************************************************* +* Win32 Timer Source File * +* (C) 1999-2006 The Botan Project * +*************************************************/ + +#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/modules/tm_win32/tm_win32.h b/modules/tm_win32/tm_win32.h new file mode 100644 index 000000000..ec4175d2d --- /dev/null +++ b/modules/tm_win32/tm_win32.h @@ -0,0 +1,24 @@ +/************************************************* +* Win32 Timer Header File * +* (C) 1999-2006 The Botan Project * +*************************************************/ + +#ifndef BOTAN_EXT_TIMER_WIN32_H__ +#define BOTAN_EXT_TIMER_WIN32_H__ + +#include <botan/timers.h> + +namespace Botan { + +/************************************************* +* Win32 Timer * +*************************************************/ +class Win32_Timer : public Timer + { + public: + u64bit clock() const; + }; + +} + +#endif |