diff options
author | lloyd <[email protected]> | 2011-02-11 14:37:07 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2011-02-11 14:37:07 +0000 |
commit | e32931ab596731310295592592cd267052664832 (patch) | |
tree | 41da348fb78e750c3c4be9baaf8b5e05647b8827 /checks/timer.cpp | |
parent | 5f4f1294b1cf1784f4fd14840a9e0824f4fa8742 (diff) | |
parent | 0e41e0e8d441ff907f092c718db650cda06e2e1a (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.cpp | 5 |
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) |