diff options
author | Martin Nowack <martin@se.inf.tu-dresden.de> | 2013-01-15 11:08:33 +0100 |
---|---|---|
committer | Martin Nowack <martin@se.inf.tu-dresden.de> | 2013-12-05 00:48:49 +0100 |
commit | 0675b9f7f3cd66c92d9babd1ccee2dcc47bdfafc (patch) | |
tree | b476be2663be7241bee3b23a40024fde3982447e /lib/Core/ExecutorTimerInfo.h | |
parent | 7c415a118f1bfc291cc6f2479b78db8041db95a4 (diff) | |
download | klee-0675b9f7f3cd66c92d9babd1ccee2dcc47bdfafc.tar.gz |
Fix timer leak
Diffstat (limited to 'lib/Core/ExecutorTimerInfo.h')
-rw-r--r-- | lib/Core/ExecutorTimerInfo.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/lib/Core/ExecutorTimerInfo.h b/lib/Core/ExecutorTimerInfo.h new file mode 100644 index 00000000..60977b74 --- /dev/null +++ b/lib/Core/ExecutorTimerInfo.h @@ -0,0 +1,42 @@ +//===-- Executor.h ----------------------------------------------*- C++ -*-===// +// +// The KLEE Symbolic Virtual Machine +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// Class to wrap information for a timer. +// +//===----------------------------------------------------------------------===// + +#ifndef EXECUTORTIMERINFO_H_ +#define EXECUTORTIMERINFO_H_ + +#include "klee/Internal/System/Time.h" + +namespace klee { + +class Executor::TimerInfo { +public: + Timer *timer; + + /// Approximate delay per timer firing. + double rate; + /// Wall time for next firing. + double nextFireTime; + +public: + TimerInfo(Timer *_timer, double _rate) + : timer(_timer), + rate(_rate), + nextFireTime(util::getWallTime() + rate) {} + ~TimerInfo() { delete timer; } +}; + + +} + + +#endif /* EXECUTORTIMERINFO_H_ */ |