mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
[util] Introduce a SetMockTime that takes chrono time
This commit is contained in:
@@ -53,6 +53,11 @@ void SetMockTime(int64_t nMockTimeIn)
|
||||
nMockTime.store(nMockTimeIn, std::memory_order_relaxed);
|
||||
}
|
||||
|
||||
void SetMockTime(std::chrono::seconds mock_time_in)
|
||||
{
|
||||
nMockTime.store(mock_time_in.count(), std::memory_order_relaxed);
|
||||
}
|
||||
|
||||
std::chrono::seconds GetMockTime()
|
||||
{
|
||||
return std::chrono::seconds(nMockTime.load(std::memory_order_relaxed));
|
||||
|
||||
Reference in New Issue
Block a user