Skip to content

Commit cace1a7

Browse files
committed
Revert "Uptime (Windows): use QueryUnbiasedInterruptTime"
Fixes #1935 This reverts commit b812f3c.
1 parent 9c0cf86 commit cace1a7

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
#include "uptime.h"
22
#include "common/time.h"
33

4-
#include <realtimeapiset.h>
4+
#include <sysinfoapi.h>
55

66
const char* ffDetectUptime(FFUptimeResult* result)
77
{
8-
// According to MSDN, this function only fails if it's called with NULL
9-
QueryUnbiasedInterruptTime(&result->uptime);
10-
result->uptime /= 10000; // Convert from 100-nanosecond intervals to milliseconds
8+
result->uptime = GetTickCount64();
119
result->bootTime = ffTimeGetNow() - result->uptime;
1210
return NULL;
1311
}

0 commit comments

Comments
 (0)