Skip to content

Commit f490412

Browse files
authored
Merge pull request #2579 from readdle/fix-windows-system-uptime
[Windows] Fix precision loss in CFGetSystemUptime()
2 parents dfa3570 + 380feeb commit f490412

File tree

1 file changed

+1
-1
lines changed
  • CoreFoundation/NumberDate.subproj

1 file changed

+1
-1
lines changed

CoreFoundation/NumberDate.subproj/CFDate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ CF_EXPORT CFTimeInterval CFGetSystemUptime(void) {
122122
return (double)res.tv_sec + ((double)res.tv_nsec)/1.0E9;
123123
#elif TARGET_OS_WIN32
124124
ULONGLONG ullTickCount = GetTickCount64();
125-
return ullTickCount / 1000;
125+
return ullTickCount / 1000.0;
126126
#else
127127
#error Unable to calculate uptime for this platform
128128
#endif

0 commit comments

Comments
 (0)