aboutsummaryrefslogtreecommitdiffstats
path: root/checks/timer.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-11-19 17:35:33 +0000
committerlloyd <[email protected]>2009-11-19 17:35:33 +0000
commit46eb21cd08a0268d860eeef449e7474fb615b050 (patch)
tree029d5bdea51f1606ecb6f241c5964881b98b1d5f /checks/timer.cpp
parentac3db1c524fdecbc069a5e1323d93e4a3b933152 (diff)
parent2af8cfbaf23033250a6819be9f45f82bf03e898d (diff)
propagate from branch 'net.randombit.botan' (head 2f3665f775fafbdfa517ecdca7f872e35bd90277)
to branch 'net.randombit.botan.c++0x' (head 45169719ddd8977b1eb20637576bc855dbc867a0)
Diffstat (limited to 'checks/timer.cpp')
-rw-r--r--checks/timer.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/checks/timer.cpp b/checks/timer.cpp
index 8460257d4..aaea4b361 100644
--- a/checks/timer.cpp
+++ b/checks/timer.cpp
@@ -1,5 +1,5 @@
#include "timer.h"
-#include <botan/benchmark.h>
+#include <chrono>
#include <iomanip>
Timer::Timer(const std::string& n, u32bit e_mul) :
@@ -32,8 +32,8 @@ void Timer::stop()
u64bit Timer::get_clock()
{
- Botan::Default_Benchmark_Timer timer;
- return timer.clock();
+ auto now = std::chrono::high_resolution_clock::now().time_since_epoch();
+ return std::chrono::duration_cast<std::chrono::nanoseconds>(now).count();
}
std::ostream& operator<<(std::ostream& out, Timer& timer)