klee
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Timer.cpp
Go to the documentation of this file.
1 //===-- Timer.cpp ---------------------------------------------------------===//
2 //
3 // The KLEE Symbolic Virtual Machine
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #include "klee/Config/Version.h"
12 
13 #include "llvm/Support/Process.h"
14 
15 using namespace klee;
16 using namespace llvm;
17 
19  sys::TimeValue now(0,0),user(0,0),sys(0,0);
20  sys::Process::GetTimeUsage(now,user,sys);
21  startMicroseconds = now.usec();
22 }
23 
24 uint64_t WallTimer::check() {
25  sys::TimeValue now(0,0),user(0,0),sys(0,0);
26  sys::Process::GetTimeUsage(now,user,sys);
27  return now.usec() - startMicroseconds;
28 }
uint64_t check()
check - Return the delta since the timer was created, in microseconds.
Definition: Timer.cpp:24