Skip to content

Commit 5a5c547

Browse files
committed
Mark time_points as const
1 parent 5fa9ab1 commit 5a5c547

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/queens.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ void run_queens(int argc, char** argv)
9494

9595
// ========================================================================
9696
// Initialise package manager
97-
time_point t_init_before = get_timestamp();
97+
const time_point t_init_before = get_timestamp();
9898
adapter_t adapter(N*N);
99-
time_point t_init_after = get_timestamp();
99+
const time_point t_init_after = get_timestamp();
100100
INFO("\n %s initialisation:\n", adapter_t::NAME.c_str());
101101
INFO(" | time (ms): %zu\n", duration_of(t_init_before, t_init_after));
102102

@@ -105,9 +105,9 @@ void run_queens(int argc, char** argv)
105105
// ========================================================================
106106
// Compute the bdd that represents the entire board
107107
INFO("\n Decision diagram construction:\n");
108-
time_point t1 = get_timestamp();
108+
const time_point t1 = get_timestamp();
109109
typename adapter_t::dd_t res = queens_B(adapter);
110-
time_point t2 = get_timestamp();
110+
const time_point t2 = get_timestamp();
111111

112112
const time_duration construction_time = duration_of(t1,t2);
113113

@@ -122,9 +122,9 @@ void run_queens(int argc, char** argv)
122122
// ========================================================================
123123
// Count number of solutions
124124
INFO("\n Counting solutions:\n");
125-
time_point t3 = get_timestamp();
125+
const time_point t3 = get_timestamp();
126126
solutions = adapter.satcount(res);
127-
time_point t4 = get_timestamp();
127+
const time_point t4 = get_timestamp();
128128

129129
const time_duration counting_time = duration_of(t3,t4);
130130

0 commit comments

Comments
 (0)