summaryrefslogtreecommitdiff
path: root/src/main/main.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/main.h')
-rw-r--r--src/main/main.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/main/main.h b/src/main/main.h
index b769bee7d..518145577 100644
--- a/src/main/main.h
+++ b/src/main/main.h
@@ -14,7 +14,9 @@
** Header for main CVC4 driver.
**/
+#include <chrono>
#include <exception>
+#include <memory>
#include <string>
#include "base/exception.h"
@@ -36,7 +38,20 @@ extern const char* progPath;
extern const std::string* progName;
/** A reference for use by the signal handlers to print statistics */
-extern CVC4::main::CommandExecutor* pExecutor;
+extern std::unique_ptr<CVC4::main::CommandExecutor> pExecutor;
+
+/** Manages a custom timer for the total runtime in RAII-style. */
+class TotalTimer
+{
+ public:
+ TotalTimer() : d_start(std::chrono::steady_clock::now()) {}
+ ~TotalTimer();
+
+ private:
+ std::chrono::steady_clock::time_point d_start;
+};
+/** The time point the binary started, accessible to signal handlers */
+extern std::unique_ptr<TotalTimer> totalTime;
/**
* If true, will not spin on segfault even when CVC4_DEBUG is on.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback