mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-07 03:03:58 +01:00
[util] Add method that returns random time in milliseconds
This commit is contained in:
@@ -592,6 +592,11 @@ std::chrono::microseconds GetRandMicros(std::chrono::microseconds duration_max)
|
||||
return std::chrono::microseconds{GetRand(duration_max.count())};
|
||||
}
|
||||
|
||||
std::chrono::milliseconds GetRandMillis(std::chrono::milliseconds duration_max) noexcept
|
||||
{
|
||||
return std::chrono::milliseconds{GetRand(duration_max.count())};
|
||||
}
|
||||
|
||||
int GetRandInt(int nMax) noexcept
|
||||
{
|
||||
return GetRand(nMax);
|
||||
|
||||
Reference in New Issue
Block a user