mirror of
https://github.com/yuzu-emu/discord-rpc.git
synced 2024-11-27 21:04:25 +01:00
Seed random number generator
This commit is contained in:
parent
52bdc2714d
commit
059ab337c8
@ -3,6 +3,7 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <random>
|
#include <random>
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
struct Backoff {
|
struct Backoff {
|
||||||
int64_t minAmount;
|
int64_t minAmount;
|
||||||
@ -19,6 +20,7 @@ struct Backoff {
|
|||||||
, maxAmount(max)
|
, maxAmount(max)
|
||||||
, current(min)
|
, current(min)
|
||||||
, fails(0)
|
, fails(0)
|
||||||
|
, randGenerator(time(0))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user