aboutsummaryrefslogtreecommitdiff
path: root/src/util/time.h
diff options
context:
space:
mode:
authorAmiti Uttarwar <amiti@uttarwar.org>2021-02-12 10:23:45 -0800
committerAmiti Uttarwar <amiti@uttarwar.org>2021-02-16 12:23:00 -0800
commit47a7a1687d276bfa8769dee4bb78e8725f67a50e (patch)
treed46255108b13e0e5ec1bece599946dcdfe1fa92b /src/util/time.h
parentdf6a5fc1dff3b1b7c2f2b67aad1ff17cac99f7b6 (diff)
downloadbitcoin-47a7a1687d276bfa8769dee4bb78e8725f67a50e.tar.xz
[util] Introduce a SetMockTime that takes chrono time
Diffstat (limited to 'src/util/time.h')
-rw-r--r--src/util/time.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/util/time.h b/src/util/time.h
index 38edc71de1..52679a2647 100644
--- a/src/util/time.h
+++ b/src/util/time.h
@@ -46,6 +46,9 @@ int64_t GetSystemTimeInSeconds(); // Like GetTime(), but not mockable
/** For testing. Set e.g. with the setmocktime rpc, or -mocktime argument */
void SetMockTime(int64_t nMockTimeIn);
+/** For testing. Set e.g. with the setmocktime rpc, or -mocktime argument */
+void SetMockTime(std::chrono::seconds mock_time_in);
+
/** For testing */
std::chrono::seconds GetMockTime();