From 92f31b22dfe2aa1b2bde84cbaf4ce7365fa4ec68 Mon Sep 17 00:00:00 2001 From: lloyd Date: Tue, 13 Oct 2009 21:27:28 +0000 Subject: Attic-ize all of src/timer, except for time_t_to_tm and system_time (which will go later) which will live in the new time.h --- Attic/timer/cpu_counter/tm_hard.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Attic/timer/cpu_counter/tm_hard.h (limited to 'Attic/timer/cpu_counter/tm_hard.h') 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 + +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 -- cgit v1.2.3