aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorPieter Wuille <pieter@wuille.net>2020-09-29 20:19:57 -0700
committerDhruv Mehta <856960+dhruv@users.noreply.github.com>2021-03-03 09:48:07 -0800
commit55e82881a1503bff146970856c1474a6ea659c94 (patch)
tree0509594a0e86852e8601d14ab44cd5a102f6bc40 /src/util
parentc733ac4d8a597b1001555b142f488ed9fbecc405 (diff)
downloadbitcoin-55e82881a1503bff146970856c1474a6ea659c94.tar.xz
Make all Poisson delays use std::chrono types
Diffstat (limited to 'src/util')
-rw-r--r--src/util/time.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/util/time.h b/src/util/time.h
index 9b418637c3..7ebcaaa339 100644
--- a/src/util/time.h
+++ b/src/util/time.h
@@ -26,9 +26,9 @@ void UninterruptibleSleep(const std::chrono::microseconds& n);
* This helper is used to convert durations before passing them over an
* interface that doesn't support std::chrono (e.g. RPC, debug log, or the GUI)
*/
-inline int64_t count_seconds(std::chrono::seconds t) { return t.count(); }
-inline int64_t count_milliseconds(std::chrono::milliseconds t) { return t.count(); }
-inline int64_t count_microseconds(std::chrono::microseconds t) { return t.count(); }
+constexpr int64_t count_seconds(std::chrono::seconds t) { return t.count(); }
+constexpr int64_t count_milliseconds(std::chrono::milliseconds t) { return t.count(); }
+constexpr int64_t count_microseconds(std::chrono::microseconds t) { return t.count(); }
using SecondsDouble = std::chrono::duration<double, std::chrono::seconds::period>;