kernel32: Simplify is_not_current().

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Huw Davies 2019-05-15 11:45:51 +01:00 committed by Alexandre Julliard
parent 3593f7da66
commit a94a21026d
1 changed files with 7 additions and 7 deletions

View File

@ -713,15 +713,15 @@ static void PROFILE_ReleaseFile(void)
* two seconds, so files that are not at least two seconds old might * two seconds, so files that are not at least two seconds old might
* keep their time even on modification, so don't cache them. * 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; LARGE_INTEGER now;
LONGLONG ftll, nowll; LONGLONG ftll;
GetSystemTimeAsFileTime(&Now);
NtQuerySystemTime( &now );
ftll = ((LONGLONG)ft->dwHighDateTime << 32) + ft->dwLowDateTime; ftll = ((LONGLONG)ft->dwHighDateTime << 32) + ft->dwLowDateTime;
nowll = ((LONGLONG)Now.dwHighDateTime << 32) + Now.dwLowDateTime; TRACE("%s; %s\n", wine_dbgstr_longlong(ftll), wine_dbgstr_longlong(now.QuadPart));
TRACE("%08x;%08x\n",(unsigned)ftll+21000000,(unsigned)nowll); return ftll + 21000000 < now.QuadPart;
return ftll + 21000000 < nowll;
} }
/*********************************************************************** /***********************************************************************