Skip to content

Commit 1e6ce52

Browse files
author
Daniel Kroening
committed
chrono
1 parent e829a82 commit 1e6ce52

File tree

2 files changed

+17
-12
lines changed

2 files changed

+17
-12
lines changed

src/ebmc/cegar/bmc_cegar.cpp

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,16 @@ Author: Daniel Kroening, [email protected]
66
77
\*******************************************************************/
88

9-
#include <cassert>
10-
11-
#include <util/time_stopping.h>
9+
#include "bmc_cegar.h"
1210

1311
#include <trans-netlist/instantiate_netlist.h>
1412
#include <trans-netlist/unwind_netlist.h>
1513
#include <trans-netlist/ldg.h>
1614
#include <trans-netlist/trans_to_netlist.h>
1715
#include <trans-netlist/compute_ct.h>
1816

19-
#include "bmc_cegar.h"
17+
#include <cassert>
18+
#include <chrono>
2019

2120
/*******************************************************************\
2221
@@ -40,16 +39,20 @@ void bmc_cegart::bmc_cegar()
4039
return;
4140
}
4241

43-
absolute_timet start_time=current_time();
42+
auto start_time=std::chrono::steady_clock::now();
4443

4544
try { cegar_loop(); }
4645

4746
catch(int)
4847
{
4948
}
5049

51-
statistics() << "CEGAR time: "
52-
<< (current_time()-start_time) << eom;
50+
auto stop_time = std::chrono::steady_clock::now();
51+
52+
statistics()
53+
<< "CEGAR time: "
54+
<< std::chrono::duration<double>(stop_time-start_time).count()
55+
<< eom;
5356
}
5457

5558
/*******************************************************************\

src/ebmc/ebmc_base.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ Author: Daniel Kroening, [email protected]
99
#include <fstream>
1010
#include <iostream>
1111

12-
#include <util/time_stopping.h>
1312
#include <util/get_module.h>
1413
#include <util/xml.h>
1514
#include <util/find_macros.h>
@@ -34,7 +33,6 @@ Author: Daniel Kroening, [email protected]
3433

3534
#include <langapi/language_util.h>
3635
#include <langapi/mode.h>
37-
#include <langapi/languages.h>
3836

3937
#include "ebmc_base.h"
4038
#include "ebmc_version.h"
@@ -99,7 +97,7 @@ int ebmc_baset::finish_bmc(prop_convt &solver)
9997
status() << "Solving with "
10098
<< solver.decision_procedure_text() << eom;
10199

102-
absolute_timet sat_start_time=current_time();
100+
auto sat_start_time = std::chrono::steady_clock::now();
103101

104102
// Use assumptions to check the properties separately
105103

@@ -159,8 +157,12 @@ int ebmc_baset::finish_bmc(prop_convt &solver)
159157
}
160158
}
161159

162-
statistics() << "Solver time: " << (current_time()-sat_start_time)
163-
<< eom;
160+
auto sat_stop_time = std::chrono::steady_clock::now();
161+
162+
statistics()
163+
<< "Solver time: "
164+
<< std::chrono::duration<double>(current_time()-sat_start_time).count()
165+
<< eom;
164166

165167
// We return '0' if the property holds,
166168
// and '10' if it is violated.

0 commit comments

Comments
 (0)