| 16 | std::weak_ptr<lazy_file_sink_mt> Log::s_LogSink; |
| 17 | |
| 18 | std::time_t Log::GetProcessCreationTime() noexcept |
| 19 | { |
| 20 | FILETIME creationTime, exitTime, kernelTime, userTime; |
| 21 | if (GetProcessTimes(GetCurrentProcess(), &creationTime, &exitTime, &kernelTime, &userTime)) |
| 22 | { |
| 23 | using winrt::clock; |
| 24 | return clock::to_time_t(clock::from_file_time(creationTime)); |
| 25 | } |
| 26 | else |
| 27 | { |
| 28 | // Fallback to current time |
| 29 | using std::chrono::system_clock; |
| 30 | return system_clock::to_time_t(system_clock::now()); |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | std::filesystem::path Log::GetPath(const std::optional<std::filesystem::path> &storageFolder) |
| 35 | { |
nothing calls this directly
no outgoing calls
no test coverage detected