diff options
author | lloyd <[email protected]> | 2009-11-17 07:20:51 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2009-11-17 07:20:51 +0000 |
commit | 7a24783fd58b21e1ea59615025806663e5f231eb (patch) | |
tree | b77c685e0b54f82890947009631461bcfe5b6880 /Attic/timer/cpu_counter/tm_hard.h | |
parent | e00b46cf9c1dcb364ebb7d5968d6ff9dcd600c4e (diff) | |
parent | 471847e2148776e62e4f580ade95572fc525c751 (diff) |
propagate from branch 'net.randombit.botan' (head 0ac5a29496b4e50775827d9655c064f6d1c98813)
to branch 'net.randombit.botan.c++0x' (head 3232da044d41756582b53da9d14c3ac07e9b2916)
Diffstat (limited to 'Attic/timer/cpu_counter/tm_hard.h')
-rw-r--r-- | Attic/timer/cpu_counter/tm_hard.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Attic/timer/cpu_counter/tm_hard.h b/Attic/timer/cpu_counter/tm_hard.h new file mode 100644 index 000000000..2e338eca8 --- /dev/null +++ b/Attic/timer/cpu_counter/tm_hard.h @@ -0,0 +1,33 @@ +/* +* Hardware Timer +* (C) 1999-2007 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ + +#ifndef BOTAN_TIMER_HARDWARE_H__ +#define BOTAN_TIMER_HARDWARE_H__ + +#include <botan/timer.h> + +namespace Botan { + +/* +* Hardware Timer +*/ +class BOTAN_DLL Hardware_Timer : public Timer + { + public: + /* + @todo: Add sync(Timer& wall_clock, bool milliseconds) which busy + loops using wall_clock and tries to guess the tick rate of the + hardware counter, allowing it to be used for benchmarks, etc + */ + + std::string name() const { return "Hardware Timer"; } + u64bit clock() const; + }; + +} + +#endif |