| 1357 | } |
| 1358 | |
| 1359 | int64_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 | |
| 1373 | std::string Application::getHomePath() |
| 1374 | { |