Module: wine Branch: master Commit: a94a21026d39f3aac0d16856002efaed3607fc4e URL: https://source.winehq.org/git/wine.git/?a=commit;h=a94a21026d39f3aac0d168560...
Author: Huw Davies huw@codeweavers.com Date: Wed May 15 11:45:51 2019 +0100
kernel32: Simplify is_not_current().
Signed-off-by: Huw Davies huw@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/kernel32/profile.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/dlls/kernel32/profile.c b/dlls/kernel32/profile.c index 027693e..8310ad6 100644 --- a/dlls/kernel32/profile.c +++ b/dlls/kernel32/profile.c @@ -713,15 +713,15 @@ static void PROFILE_ReleaseFile(void) * two seconds, so files that are not at least two seconds old might * keep their time even on modification, so don't cache them. */ -static BOOL is_not_current(FILETIME * ft) +static BOOL is_not_current(FILETIME *ft) { - FILETIME Now; - LONGLONG ftll, nowll; - GetSystemTimeAsFileTime(&Now); + LARGE_INTEGER now; + LONGLONG ftll; + + NtQuerySystemTime( &now ); ftll = ((LONGLONG)ft->dwHighDateTime << 32) + ft->dwLowDateTime; - nowll = ((LONGLONG)Now.dwHighDateTime << 32) + Now.dwLowDateTime; - TRACE("%08x;%08x\n",(unsigned)ftll+21000000,(unsigned)nowll); - return ftll + 21000000 < nowll; + TRACE("%s; %s\n", wine_dbgstr_longlong(ftll), wine_dbgstr_longlong(now.QuadPart)); + return ftll + 21000000 < now.QuadPart; }
/***********************************************************************