From 06d4130810244883f6ec2c08c2f7251b4af1e69f Mon Sep 17 00:00:00 2001 From: trevor_hansen Date: Thu, 7 Apr 2011 13:43:19 +0000 Subject: [PATCH] Improvement. Output the time spent in a stage with -s. git-svn-id: https://stp-fast-prover.svn.sourceforge.net/svnroot/stp-fast-prover/trunk/stp@1257 e59a4935-1847-0410-ae03-e826735625c1 --- src/AST/RunTimes.h | 14 +++++++++++--- src/STPManager/STPManager.cpp | 3 ++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/AST/RunTimes.h b/src/AST/RunTimes.h index d30ed3e..4a558e6 100644 --- a/src/AST/RunTimes.h +++ b/src/AST/RunTimes.h @@ -65,11 +65,19 @@ public: void stop(Category c); void print(); + std::string getDifference() + { + std::stringstream s; + long val = getCurrentTime(); + s << (val - lastTime) << "ms" ; + lastTime = val; + return s.str(); + } + void difference() { - long val = getCurrentTime(); - std::cout << (val - lastTime) << "ms" << std::endl; - lastTime = val; + std::cout << getDifference()<< std::endl << std::endl; + } RunTimes() diff --git a/src/STPManager/STPManager.cpp b/src/STPManager/STPManager.cpp index 3aef19e..ce86865 100644 --- a/src/STPManager/STPManager.cpp +++ b/src/STPManager/STPManager.cpp @@ -615,7 +615,8 @@ namespace BEEV StatInfoSet.clear(); //print node size: - cout << endl << "Printing: " << c; + + cout << "[" << GetRunTimes()->getDifference() << "]" << "Printing: " << c; if (UserFlags.print_nodes_flag) { //a.PL_Print(cout,0); -- 2.47.3