aboutsummaryrefslogtreecommitdiffstats
path: root/checks/bench.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-02-20 21:12:29 +0000
committerlloyd <[email protected]>2012-02-20 21:12:29 +0000
commit49f333282279cc22fa8af7423447973b9dcfeee9 (patch)
tree574a19e310aeb158dcc08016b3ce91a9d0ac0f81 /checks/bench.cpp
parent73e7730306b524aeee6fcfe8dd9f41b9673cf31b (diff)
Remove get_nanoseconds_clock as we'll rely on std::chrono's high
resolution clock for this in C++11. Now that the only remaining function in time.h is calendar_point, rename the header to calendar.h. Hopefully that last use will go away once a TR2 datetime library becomes available. Use std::chrono inside the library benchmark code.
Diffstat (limited to 'checks/bench.cpp')
-rw-r--r--checks/bench.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/checks/bench.cpp b/checks/bench.cpp
index 8f7f6c77f..b6bf93377 100644
--- a/checks/bench.cpp
+++ b/checks/bench.cpp
@@ -187,10 +187,11 @@ bool bench_algo(const std::string& algo,
{
Botan::Algorithm_Factory& af = Botan::global_state().algorithm_factory();
- u32bit milliseconds = static_cast<u32bit>(seconds * 1000);
+ std::chrono::milliseconds ms(
+ static_cast<std::chrono::milliseconds::rep>(seconds * 1000));
std::map<std::string, double> speeds =
- algorithm_benchmark(algo, af, rng, milliseconds, buf_size);
+ algorithm_benchmark(algo, af, rng, ms, buf_size);
if(speeds.empty()) // maybe a cipher mode, then?
{