aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/Support/Timer.cpp
diff options
context:
space:
mode:
authorFrank Busse <bb0xfb@gmail.com>2017-11-24 16:58:27 +0000
committerCristian Cadar <c.cadar@imperial.ac.uk>2018-10-30 22:22:26 +0200
commit3caf3e985e4f35ac6ac04f61b92f11d2569550c6 (patch)
tree4c8cb1ce7e8d7bdf4f890e76b98ea2ef77370f66 /lib/Support/Timer.cpp
parent652c2bdc171a448a2d6082040eebec366946ad33 (diff)
downloadklee-3caf3e985e4f35ac6ac04f61b92f11d2569550c6.tar.gz
Base time API upon std::chrono
This should not change the behaviour of KLEE and mimics the old API. - functions moved from util into time namespace - uses time points and time spans instead of double - CLI arguments now have the form "3h5min8us" Changed command line parameters: - batch-time (double to string) - istats-write-interval (double to string) - max-instruction-time (double to string) - max-solver-time (double to string) - max-time (double to string) - min-query-time-to-log (double to string) - seed-time (double to string) - stats-write-interval (double to string) - uncovered-update-interval (double to string) - added: log-timed-out-queries (replaces negative max-solver-time)
Diffstat (limited to 'lib/Support/Timer.cpp')
-rw-r--r--lib/Support/Timer.cpp24
1 files changed, 3 insertions, 21 deletions
diff --git a/lib/Support/Timer.cpp b/lib/Support/Timer.cpp
index 0e727bb4..4e52feb5 100644
--- a/lib/Support/Timer.cpp
+++ b/lib/Support/Timer.cpp
@@ -9,32 +9,14 @@
#include "klee/Config/Version.h"
#include "klee/Internal/Support/Timer.h"
-
#include "klee/Internal/System/Time.h"
using namespace klee;
-using namespace llvm;
-
-#if LLVM_VERSION_CODE >= LLVM_VERSION(4, 0)
WallTimer::WallTimer() {
- start = util::getWallTimeVal();
+ start = time::getWallTime();
}
-uint64_t WallTimer::check() {
- auto now = util::getWallTimeVal();
- return std::chrono::duration_cast<std::chrono::microseconds>(now -
- start).count();
+time::Span WallTimer::check() {
+ return time::Span(time::getWallTime() - start);
}
-
-#else
-
-WallTimer::WallTimer() {
- startMicroseconds = util::getWallTimeVal().usec();
-}
-
-uint64_t WallTimer::check() {
- return util::getWallTimeVal().usec() - startMicroseconds;
-}
-
-#endif