From c8c72de6ac6d8e8eae988a61c825d9c4c054f175 Mon Sep 17 00:00:00 2001 From: Tyler Neely Date: Tue, 22 Nov 2022 11:30:24 +0000 Subject: [PATCH] Use duration_cast to ensure that we are retrieving milliseconds inside SimulatorStats::operator<< --- src/io/simulator/simulator_stats.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/io/simulator/simulator_stats.hpp b/src/io/simulator/simulator_stats.hpp index 972d09bf8..b02dc9f2a 100644 --- a/src/io/simulator/simulator_stats.hpp +++ b/src/io/simulator/simulator_stats.hpp @@ -30,7 +30,7 @@ struct SimulatorStats { friend bool operator==(const SimulatorStats & /* lhs */, const SimulatorStats & /* rhs */) = default; friend std::ostream &operator<<(std::ostream &in, const SimulatorStats &stats) { - auto elapsed_ms = stats.elapsed_time.count() / 1000; + auto elapsed_ms = std::chrono::duration_cast(stats.elapsed_time).count() / 1000; std::string formated = fmt::format( "SimulatorStats {{ total_messages: {}, dropped_messages: {}, timed_out_requests: {}, total_requests: {}, "