aboutsummaryrefslogtreecommitdiffstats
path: root/checks/timer.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2011-02-11 14:37:07 +0000
committerlloyd <[email protected]>2011-02-11 14:37:07 +0000
commite32931ab596731310295592592cd267052664832 (patch)
tree41da348fb78e750c3c4be9baaf8b5e05647b8827 /checks/timer.cpp
parent5f4f1294b1cf1784f4fd14840a9e0824f4fa8742 (diff)
parent0e41e0e8d441ff907f092c718db650cda06e2e1a (diff)
propagate from branch 'net.randombit.botan' (head 13a0d36dac3709f3cb88e830ed7f8cab9e7433ab)
to branch 'net.randombit.botan.c++0x' (head 2221ad8796466e7e096645de77ba856a9c902d14)
Diffstat (limited to 'checks/timer.cpp')
-rw-r--r--checks/timer.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/checks/timer.cpp b/checks/timer.cpp
index 3736a4779..9f3d34607 100644
--- a/checks/timer.cpp
+++ b/checks/timer.cpp
@@ -5,7 +5,7 @@
*/
#include "timer.h"
-#include <botan/time.h>
+#include <chrono>
#include <iomanip>
Timer::Timer(const std::string& n, u32bit e_mul) :
@@ -38,7 +38,8 @@ void Timer::stop()
u64bit Timer::get_clock()
{
- return Botan::get_nanoseconds_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)