Changeset 12714


Ignore:
Timestamp:
Aug 29, 2009, 2:55:24 AM (10 years ago)
Author:
palter
Message:

Fix GET-INTERNAL-REAL-TIME on Windows. The kernel function wasn't properly
converting from microseconds to milliseconds, reducing the resolution
of GET-INTERNAL-REAL-TIME to 1 second.

New Win32 executable. Could someone please build an Win64 executable?

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/windows-calls.c

    r12522 r12714  
    708708  GetSystemTimeAsFileTime((FILETIME*)&now);
    709709  now -= UNIX_EPOCH_IN_WINDOWS_EPOCH;
    710   now /= 10000;
     710  now /= 10000;               /* convert time to milliseconds */
    711711  tp->tv_sec = now/1000LL;
    712   tp->tv_usec = now%1000LL;
     712  tp->tv_usec = 1000 * (now%1000LL); /* convert milliseconds to microseconds */
    713713  return 0;
    714714}
Note: See TracChangeset for help on using the changeset viewer.