Timer.cpp

Go to the documentation of this file.
00001 //===-- Timer.cpp ---------------------------------------------------------===//
00002 //
00003 //                     The KLEE Symbolic Virtual Machine
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
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 }

Generated on Fri Jun 5 03:31:32 2009 for klee by  doxygen 1.5.8