MCPcopy Create free account
hub / github.com/AutonomousFieldRoboticsLab/SVIn / SeedRand

Method SeedRand

pose_graph/ThirdParty/DUtils/Random.cpp:17–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15bool DUtils::Random::m_already_seeded = false;
16
17void DUtils::Random::SeedRand() {
18 Timestamp time;
19 time.setToCurrentTime();
20 srand((unsigned)time.getFloatTime());
21}
22
23void DUtils::Random::SeedRandOnce() {
24 if (!m_already_seeded) {

Callers

nothing calls this directly

Calls 2

setToCurrentTimeMethod · 0.80
getFloatTimeMethod · 0.80

Tested by

no test coverage detected