mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-29 16:01:38 +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,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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue