File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -131,7 +131,6 @@ test_suite* init_unit_test_suite(int, char*[]);
131131
132132int main (int argc, char * argv[]) {
133133 typedef QuantLib::Time Time;
134- boost::timer::cpu_timer testTimer;
135134
136135 std::string moduleName = BOOST_TEST_MODULE;
137136 std::string profileFileNameStr = moduleName + " _unit_test_profile.txt" ;
@@ -151,6 +150,7 @@ int main(int argc, char* argv[]) {
151150 try {
152151 unsigned int priority;
153152 if (!clientMode) {
153+ auto startTime = std::chrono::steady_clock::now ();
154154 std::map<std::string, Time> runTimeLog;
155155
156156 std::ifstream in (profileFileName);
@@ -307,8 +307,10 @@ int main(int argc, char* argv[]) {
307307 thread.join ();
308308 }
309309
310- testTimer.stop ();
311- double seconds = testTimer.elapsed ().wall * 1e-9 ;
310+ auto stopTime = std::chrono::steady_clock::now ();
311+ double seconds =
312+ std::chrono::duration_cast<std::chrono::microseconds>(stopTime - startTime)
313+ .count () * 1e-6 ;
312314 int hours = int (seconds / 3600 );
313315 seconds -= hours * 3600 ;
314316 int minutes = int (seconds / 60 );
You can’t perform that action at this time.
0 commit comments