Fix GetTickCount()/GetTickCount64() for different Windows versions

This commit is contained in:
Riccardo 2017-07-07 10:50:10 +02:00
parent 99a3655108
commit 6b455a589d
2 changed files with 12 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2017-07-07 Riccardo Mottola <rm@gnu.org>
* Source/NSProcessInfo.m:
Fix GetTickCount()/GetTickCount64() for different Windows versions.
2017-07-04 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSObject.m: When an object's retain count is incremented too

View file

@ -1,5 +1,5 @@
/** Implementation for NSProcessInfo for GNUStep
Copyright (C) 1995-2014 Free Software Foundation, Inc.
Copyright (C) 1995-2017 Free Software Foundation, Inc.
Written by: Georg Tuparev <Tuparev@EMBL-Heidelberg.de>
Heidelberg, Germany
@ -1470,7 +1470,13 @@ static void determineOperatingSystem()
NSUInteger uptime = 0;
#if defined(_WIN32)
#if _WIN32_WINNT < 0x0600 /* less than Vista */
uptime = GetTickCount() / 1000;
#else
uptime = GetTickCount64() / 1000;
#endif
#elif defined(HAVE_SYSCTLBYNAME)
struct timeval tval;
size_t len = sizeof(tval);