MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / uniqueInstanceId

Method uniqueInstanceId

src/App/Application.cpp:1359–1371  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1357}
1358
1359int64_t Application::uniqueInstanceId()
1360{
1361 static int64_t uniqueId = []() {
1362 const auto tp = std::chrono::high_resolution_clock::now();
1363 const auto dur = tp.time_since_epoch();
1364 // Mix up the bits. Smallest implementation of a xorshift64 there is.
1365 auto hash = static_cast<int64_t>(dur.count());
1366 hash ^= hash << 7;
1367 hash ^= hash >> 9;
1368 return hash & 0x7FFFFFFFFFFFFFFFULL;
1369 }();
1370 return uniqueId;
1371}
1372
1373std::string Application::getHomePath()
1374{

Callers

nothing calls this directly

Calls 2

nowFunction · 0.50
countMethod · 0.45

Tested by

no test coverage detected