aboutsummaryrefslogtreecommitdiff
path: root/src/random.h
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2019-06-12 15:19:02 -0400
committerMarcoFalke <falke.marco@gmail.com>2019-06-17 14:12:32 -0400
commitfa883ab35ad2d4328e35b1e855d0833740a6b910 (patch)
tree4efff508a9e43e652f14f1d0df4b703f50cb7743 /src/random.h
parentfce4123242c4ad76dabef1291306f5ba879cdc00 (diff)
net: Use mockable time for tx download
Diffstat (limited to 'src/random.h')
-rw-r--r--src/random.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/random.h b/src/random.h
index 75d037738d..22801ec155 100644
--- a/src/random.h
+++ b/src/random.h
@@ -10,7 +10,8 @@
#include <crypto/common.h>
#include <uint256.h>
-#include <stdint.h>
+#include <chrono> // For std::chrono::microseconds
+#include <cstdint>
#include <limits>
/**
@@ -69,6 +70,7 @@
*/
void GetRandBytes(unsigned char* buf, int num) noexcept;
uint64_t GetRand(uint64_t nMax) noexcept;
+std::chrono::microseconds GetRandMicros(std::chrono::microseconds duration_max) noexcept;
int GetRandInt(int nMax) noexcept;
uint256 GetRandHash() noexcept;