Merge #20602: util: Allow use of C++14 chrono literals

fa11110bff util: Allow use of C++14 chrono literals (MarcoFalke)

Pull request description:

  I think we should allow the use of chrono literals for new code to make it less verbose. Obviously old code can stay as-is.

  This patch pulls in the needed namespace and replaces some lines for illustrative purposes.

ACKs for top commit:
  vasild:
    ACK fa11110bff
  jonatack:
    ACK fa11110bff

Tree-SHA512: ee2b72c8f28dee07b33b9a8ee8f7c87c0bc43b05c56a17b786cf9803ef204c7628e01b02de1af1a4eb01f5cdf6fc336f69c2833e17acd606ebda20ac6917e6bb
This commit is contained in:
MarcoFalke
2020-12-09 17:15:00 +01:00
4 changed files with 7 additions and 5 deletions

View File

@@ -4057,7 +4057,7 @@ bool PeerManager::SendMessages(CNode* pto)
// over since our last self-announcement, but there is only a small
// bandwidth cost that we can incur by doing this (which happens
// once a day on average).
if (pto->m_next_local_addr_send != std::chrono::microseconds::zero()) {
if (pto->m_next_local_addr_send != 0us) {
pto->m_addr_known->reset();
}
AdvertiseLocal(pto);