| 782 | |
| 783 | |
| 784 | double getUnixTime() { |
| 785 | // This is not guaranteed to return the time since 1970 in C++11. (It only does in C++20). |
| 786 | // However, it does on all platforms I care about. |
| 787 | auto duration = std::chrono::system_clock::now().time_since_epoch(); |
| 788 | return std::chrono::duration<double>(duration).count(); |
| 789 | } |
| 790 | |
| 791 | |
| 792 | double getThreadTime() { |
no outgoing calls
no test coverage detected