Skip to content

Commit 5c18c87

Browse files
change timer scale
1 parent b4ab571 commit 5c18c87

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cddp_core/CDDPProblem.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,10 +220,10 @@ std::cout << "Cost " << J_ << std::endl;
220220
auto end_time = std::chrono::high_resolution_clock::now();
221221

222222
// Calculate the elapsed time
223-
auto duration = std::chrono::duration_cast<std::chrono::milliseconds>(end_time - start_time);
223+
auto duration = std::chrono::duration_cast<std::chrono::microseconds>(end_time - start_time);
224224

225225
// Print the elapsed time
226-
std::cout << "Solver time: " << duration.count() << " ms" << std::endl;
226+
std::cout << "Solver time: " << duration.count() << " micro sec" << std::endl;
227227

228228
// 6. Return Optimal Control Sequence
229229
// place holder

0 commit comments

Comments
 (0)