diff options
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/resource_manager.h | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/src/util/resource_manager.h b/src/util/resource_manager.h index c84bed38d..7af10ba36 100644 --- a/src/util/resource_manager.h +++ b/src/util/resource_manager.h @@ -34,28 +34,17 @@ namespace CVC4 { * the PropEngine when the budget expires. */ class CVC4_PUBLIC Timer { - - uint64_t d_ms; - timeval d_wall_limit; - clock_t d_cpu_start_time; - clock_t d_cpu_limit; - - bool d_wall_time; - - /** Return the milliseconds elapsed since last set() cpu time. */ - uint64_t elapsedCPU() const; - /** Return the milliseconds elapsed since last set() wall time. */ - uint64_t elapsedWall() const; - -public: - + public: /** Construct a Timer. */ Timer() - : d_ms(0) - , d_cpu_start_time(0) - , d_cpu_limit(0) - , d_wall_time(true) - {} + : d_ms(0), + d_cpu_start_time(0), + d_cpu_limit(0), + d_wall_time(true) + { + d_wall_limit.tv_sec = 0; + d_wall_limit.tv_usec = 0; + } /** Is the timer currently active? */ bool on() const { @@ -69,6 +58,18 @@ public: uint64_t elapsed() const; bool expired() const; + private: + + /** Return the milliseconds elapsed since last set() cpu time. */ + uint64_t elapsedCPU() const; + /** Return the milliseconds elapsed since last set() wall time. */ + uint64_t elapsedWall() const; + + uint64_t d_ms; + clock_t d_cpu_start_time; + clock_t d_cpu_limit; + bool d_wall_time; + timeval d_wall_limit; };/* class Timer */ |