aboutsummaryrefslogtreecommitdiffstats
path: root/checks/timer.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-05-19 14:06:59 +0000
committerlloyd <[email protected]>2010-05-19 14:06:59 +0000
commit2295ef9e8d97065ad2920f5039878728e52a144f (patch)
tree8776271409e706f5d2695d6ec05f8fbd3680e4ef /checks/timer.cpp
parent4cace3ee04ae9a20a57b1fa11447a1917f0f155d (diff)
parentb724994a7385e4ddd2e4e0684383302271ea2bf9 (diff)
propagate from branch 'net.randombit.botan' (head 66b216669d7ac91303378281d760236153955ae4)
to branch 'net.randombit.botan.c++0x' (head b911a76971563afcde85935a44a43248a3f5b4a6)
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)