[util] Introduce a SetMockTime that takes chrono time

This commit is contained in:
Amiti Uttarwar
2021-02-12 10:23:45 -08:00
parent df6a5fc1df
commit 47a7a1687d
2 changed files with 8 additions and 0 deletions

View File

@@ -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();