MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / produceRandomSeed

Function produceRandomSeed

source/core/StarRandom.cpp:195–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

193 static Mutex g_randMutex;
194
195 static uint64_t produceRandomSeed() {
196 int64_t seed = Time::monotonicTicks();
197 seed *= 1099511628211;
198 seed ^= (((int64_t)rand()) << 32) | ((int64_t)rand());
199 return seed;
200 }
201
202 void doInit(uint64_t seed) {
203 g_randSource = RandomSource(seed);

Callers 3

checkInitFunction · 0.85
initFunction · 0.85
addEntropyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected