Skip to content

Commit 380feeb

Browse files
committed
Fix precision loss in CFGetSystemUptime() on Windows
1 parent b048f4e commit 380feeb

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)