00001 //===-- TimerStatIncrementer.h ----------------------------------*- C++ -*-===// 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 #ifndef KLEE_TIMERSTATINCREMENTER_H 00011 #define KLEE_TIMERSTATINCREMENTER_H 00012 00013 #include "klee/Statistics.h" 00014 #include "klee/Internal/Support/Timer.h" 00015 00016 namespace klee { 00017 class TimerStatIncrementer { 00018 private: 00019 WallTimer timer; 00020 Statistic &statistic; 00021 00022 public: 00023 TimerStatIncrementer(Statistic &_statistic) : statistic(_statistic) {} 00024 ~TimerStatIncrementer() { 00025 statistic += timer.check(); 00026 }; 00027 00028 uint64_t check() { return timer.check(); } 00029 }; 00030 } 00031 00032 #endif
1.5.8