Uptime (Windows): improves comments

This commit is contained in:
李通洲
2026-03-23 16:01:29 +08:00
parent 92c65aad10
commit 8facb7c6e9
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -634,7 +634,9 @@ static inline uint64_t ffKSystemTimeToUInt64(const volatile KSYSTEM_TIME* pTime)
{
#if _WIN64
return *(uint64_t*) pTime;
// This is safe even if pTime is not 8-byte aligned
// See https://learn.microsoft.com/en-us/windows/win32/winprog64/fault-alignments
return *(const volatile uint64_t*) pTime;
#else
+1 -1
View File
@@ -4,7 +4,7 @@
const char* ffDetectUptime(FFUptimeResult* result)
{
// GetInterruptTime with Win7 support
// QueryInterruptTime with Win7 support
uint64_t interruptTime = ffKSystemTimeToUInt64(&SharedUserData->InterruptTime);
result->uptime = interruptTime / 10000; // Convert from 100-nanosecond intervals to milliseconds