mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
Fix GetTickCount()/GetTickCount64() for different Windows versions
This commit is contained in:
parent
99a3655108
commit
6b455a589d
2 changed files with 12 additions and 1 deletions
|
@ -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>
|
2017-07-04 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* Source/NSObject.m: When an object's retain count is incremented too
|
* Source/NSObject.m: When an object's retain count is incremented too
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/** Implementation for NSProcessInfo for GNUStep
|
/** 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>
|
Written by: Georg Tuparev <Tuparev@EMBL-Heidelberg.de>
|
||||||
Heidelberg, Germany
|
Heidelberg, Germany
|
||||||
|
@ -1470,7 +1470,13 @@ static void determineOperatingSystem()
|
||||||
NSUInteger uptime = 0;
|
NSUInteger uptime = 0;
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
|
|
||||||
|
#if _WIN32_WINNT < 0x0600 /* less than Vista */
|
||||||
|
uptime = GetTickCount() / 1000;
|
||||||
|
#else
|
||||||
uptime = GetTickCount64() / 1000;
|
uptime = GetTickCount64() / 1000;
|
||||||
|
#endif
|
||||||
|
|
||||||
#elif defined(HAVE_SYSCTLBYNAME)
|
#elif defined(HAVE_SYSCTLBYNAME)
|
||||||
struct timeval tval;
|
struct timeval tval;
|
||||||
size_t len = sizeof(tval);
|
size_t len = sizeof(tval);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue