mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-24 10:17:45 -03:00
refactor: Use C++20 std::chrono::days
This commit is contained in:
parent
d5e5810bd3
commit
faea30227b
1 changed files with 1 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue