From 531ec6e52b75cd2f600a3fc781383e7539f2335a Mon Sep 17 00:00:00 2001 From: Kshitij Bansal Date: Thu, 20 Feb 2014 08:57:39 -0500 Subject: portfolio: add stat to track time spent waiting for interrupted threads to stop --- src/util/statistics_registry.cpp | 4 ++++ src/util/statistics_registry.h | 3 +++ 2 files changed, 7 insertions(+) (limited to 'src/util') diff --git a/src/util/statistics_registry.cpp b/src/util/statistics_registry.cpp index 67cc3a53c..61762b84d 100644 --- a/src/util/statistics_registry.cpp +++ b/src/util/statistics_registry.cpp @@ -119,6 +119,10 @@ void TimerStat::stop() { } }/* TimerStat::stop() */ +bool TimerStat::running() const { + return d_running; +}/* TimerStat::running() */ + timespec TimerStat::getData() const { ::timespec data = d_data; if(__CVC4_USE_STATISTICS && d_running) { diff --git a/src/util/statistics_registry.h b/src/util/statistics_registry.h index eb5245e25..bd33557d9 100644 --- a/src/util/statistics_registry.h +++ b/src/util/statistics_registry.h @@ -808,6 +808,9 @@ public: */ void stop(); + /** If the timer is currently running */ + bool running() const; + timespec getData() const; SExpr getValue() const; -- cgit v1.2.3