Timer.cpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #include "klee/Internal/Support/Timer.h"
00011
00012 #include "llvm/System/Process.h"
00013
00014 using namespace klee;
00015 using namespace llvm;
00016
00017 WallTimer::WallTimer() {
00018 sys::TimeValue now(0,0),user(0,0),sys(0,0);
00019 sys::Process::GetTimeUsage(now,user,sys);
00020 startMicroseconds = now.usec();
00021 }
00022
00023 uint64_t WallTimer::check() {
00024 sys::TimeValue now(0,0),user(0,0),sys(0,0);
00025 sys::Process::GetTimeUsage(now,user,sys);
00026 return now.usec() - startMicroseconds;
00027 }