test: Add missing Assert(mock_time_in >= 0s) to SetMockTime
Also, inline the deprecated alias to avoid having the two go out of sync again in the future.
This commit is contained in:
1 file changed
+2
-6
+2
-6
@@ -29,14 +29,10 @@ NodeClock::time_point NodeClock::now() noexcept
|
|||||||
return time_point{ret};
|
return time_point{ret};
|
||||||
};
|
};
|
||||||
|
|
||||||
void SetMockTime(int64_t nMockTimeIn)
|
void SetMockTime(int64_t nMockTimeIn) { SetMockTime(std::chrono::seconds{nMockTimeIn}); }
|
||||||
{
|
|
||||||
Assert(nMockTimeIn >= 0);
|
|
||||||
nMockTime.store(nMockTimeIn, std::memory_order_relaxed);
|
|
||||||
}
|
|
||||||
|
|
||||||
void SetMockTime(std::chrono::seconds mock_time_in)
|
void SetMockTime(std::chrono::seconds mock_time_in)
|
||||||
{
|
{
|
||||||
|
Assert(mock_time_in >= 0s);
|
||||||
nMockTime.store(mock_time_in.count(), std::memory_order_relaxed);
|
nMockTime.store(mock_time_in.count(), std::memory_order_relaxed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user