17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 05:09:20 +02:00

seed the random engines from the system pool, not std::random_device

This commit is contained in:
maj00r
2026-09-14 17:34:59 +02:00
parent c3007e3237
commit ff3daea78c
5 changed files with 53 additions and 10 deletions

View File

@@ -6,6 +6,7 @@
#include <string>
#include <algorithm>
#include <cstdint>
#include "utilities/utilities.h"
class UID {
public:
@@ -13,7 +14,7 @@ public:
static UID random() {
static thread_local std::mt19937_64 gen(std::random_device{}());
static thread_local std::mt19937_64 gen{clock_seed()};
UID u;
uint64_t a = gen();
uint64_t b = gen();