Skip to content
Snippets Groups Projects
Commit 2e1e1aef authored by Andreas Rauschert's avatar Andreas Rauschert
Browse files

Fix time conversion to ms


Signed-off-by: default avatarAndreas Rauschert <andreas.rb.rauschert@bmw.de>
parent b9b8a064
No related branches found
No related tags found
1 merge request!25Fix time conversion to ms
...@@ -26,7 +26,7 @@ using Time = units::time::millisecond_t; ...@@ -26,7 +26,7 @@ using Time = units::time::millisecond_t;
/// @return Duration representing the given input in units of @ref Time. /// @return Duration representing the given input in units of @ref Time.
inline Time SecondsToTime(double duration) inline Time SecondsToTime(double duration)
{ {
return units::time::second_t(duration); return {std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::duration<double>{duration})};
} }
/// @brief Converts input @ref Time to [s]. /// @brief Converts input @ref Time to [s].
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment