From 978cb60f0d15ca73cc49840fa0cecf4cae1d4531 Mon Sep 17 00:00:00 2001 From: David Capello Date: Mon, 7 Oct 2024 20:49:14 -0300 Subject: [PATCH] Revert "fix: timestamp resolution to microseconds on Windows (#1039)" This reverts commit a6ba26e56eb121a1ed3cf9cb1f9e1bbfa3b80561. Related comments: https://github.com/aseprite/aseprite/issues/4691#issuecomment-2398119466 https://github.com/getsentry/sentry-native/pull/1039#issuecomment-2398218262 --- src/sentry_utils.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/sentry_utils.h b/src/sentry_utils.h index cbc72898b..41678d7d4 100644 --- a/src/sentry_utils.h +++ b/src/sentry_utils.h @@ -106,11 +106,9 @@ sentry__usec_time(void) // Contains a 64-bit value representing the number of 100-nanosecond // intervals since January 1, 1601 (UTC). FILETIME file_time; -# if _WIN32_WINNT >= 0x0602 - GetSystemTimePreciseAsFileTime(&file_time); -# else - GetSystemTimeAsFileTime(&file_time); -# endif + SYSTEMTIME system_time; + GetSystemTime(&system_time); + SystemTimeToFileTime(&system_time, &file_time); uint64_t timestamp = (uint64_t)file_time.dwLowDateTime + ((uint64_t)file_time.dwHighDateTime << 32);