refactor: Use C++20 std::chrono::days

pull/29040/head
MarcoFalke 11 months ago
parent d5e5810bd3
commit faea30227b
No known key found for this signature in database

@ -723,8 +723,7 @@ QString ConnectionTypeToQString(ConnectionType conn_type, bool prepend_direction
QString formatDurationStr(std::chrono::seconds dur)
{
using days = std::chrono::duration<int, std::ratio<86400>>; // can remove this line after C++20
const auto d{std::chrono::duration_cast<days>(dur)};
const auto d{std::chrono::duration_cast<std::chrono::days>(dur)};
const auto h{std::chrono::duration_cast<std::chrono::hours>(dur - d)};
const auto m{std::chrono::duration_cast<std::chrono::minutes>(dur - d - h)};
const auto s{std::chrono::duration_cast<std::chrono::seconds>(dur - d - h - m)};

Loading…
Cancel
Save