aboutsummaryrefslogtreecommitdiff
path: root/src/qt/guiutil.cpp
diff options
context:
space:
mode:
authorMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2023-12-08 17:15:16 +0100
committerMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2023-12-11 17:41:39 +0100
commitfaea30227ba633da5ab257d0247853e0927244bb (patch)
treefdde7b2a9b46bf802c446fd6653d35927ea4741f /src/qt/guiutil.cpp
parentd5e5810bd36f6e899d64a57e9264729b27a9c3f8 (diff)
refactor: Use C++20 std::chrono::days
Diffstat (limited to 'src/qt/guiutil.cpp')
-rw-r--r--src/qt/guiutil.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index eb9c65caf2..b8ac187ff9 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -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)};