aboutsummaryrefslogtreecommitdiffstats
path: root/checks
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
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')
-rw-r--r--checks/bench.cpp5
-rw-r--r--checks/cvc_tests.cpp1
2 files changed, 3 insertions, 3 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?
{
diff --git a/checks/cvc_tests.cpp b/checks/cvc_tests.cpp
index 1197c2d30..ccda22cfc 100644
--- a/checks/cvc_tests.cpp
+++ b/checks/cvc_tests.cpp
@@ -27,7 +27,6 @@
#include <botan/cvc_self.h>
#include <botan/cvc_cert.h>
#include <botan/cvc_ado.h>
-#include <botan/time.h>
#define TEST_DATA_DIR "checks/ecc_testdata"