diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-21 08:41:22 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-21 08:41:22 +0000 |
commit | 6a832cdb8d659f2206606007f73f52253d8cbae9 () | |
tree | a5fe11369e6c4fbe6b165786d55679293eb18bca | |
parent | ccfe37884ab566336380d0f21e15321d6382da8f (diff) |
Use GetSystemTimePreciseAsFileTime on recent Windows
* win32/win32.c (gettiemeofday, wutime): use GetSystemTimePreciseAsFileTime instead of GetSystemTimeAsFileTime if it is available. This is based on Takehiro Kubo <[email protected]> 's one (change only the name of wrapper function). Thanks! and sorry to late [ruby-dev:50167] [Feature #13732] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | win32/win32.c | 19 |
1 files changed, 17 insertions, 2 deletions
@@ -4576,13 +4576,28 @@ filetime_to_timeval(const FILETIME* ft, struct timeval *tv) return tv->tv_sec > 0 ? 0 : -1; } /* License: Ruby's */ int __cdecl gettimeofday(struct timeval *tv, struct timezone *tz) { FILETIME ft; - GetSystemTimeAsFileTime(&ft); filetime_to_timeval(&ft, tv); return 0; @@ -7314,7 +7329,7 @@ wutime(const WCHAR *path, const struct utimbuf *times) } } else { - GetSystemTimeAsFileTime(&atime); mtime = atime; } |