SUGGESTED FIX
*** /tmp/geta24136 2006-12-15 13:31:49.000000000 +0300
--- awt_Component.cpp 2006-12-15 13:31:44.000000000 +0300
***************
*** 1759,1764 ****
--- 1759,1768 ----
mr = WmPaste();
break;
+ case WM_TIMECHANGE:
+ nowMillisUTC(GetMessageTime(), TRUE);
+ break;
+
case WM_TIMER:
mr = WmTimer(wParam);
break;
***************
*** 2285,2291 ****
--- 2289,2300 ----
}
return nowMillisUTC(event_offset);
}
+
jlong nowMillisUTC(DWORD event_offset) {
+ return nowMillisUTC(event_offset, FALSE);
+ }
+
+ jlong nowMillisUTC(DWORD event_offset, BOOL updateBootTime) {
// All computations and stored values are in milliseconds. The Win32
// FILETIME structure is in 100s of nanoseconds, so the FT2INT64 macro
// divides by 10^4. (10^7 / 10^4 = 10^3).
***************
*** 2319,2325 ****
SystemTimeToFileTime(¤t_sys_time_1601, ¤t_file_time_1601);
current_time_1601 = FT2INT64(current_file_time_1601);
! if ((current_time_1601 - boot_time_1601) > WRAP_TIME_MILLIS) {
// Need to reset boot time
DWORD since_boot_millis = GetTickCount();
boot_time_1601 = current_time_1601 - since_boot_millis;
--- 2328,2334 ----
SystemTimeToFileTime(¤t_sys_time_1601, ¤t_file_time_1601);
current_time_1601 = FT2INT64(current_file_time_1601);
! if (((current_time_1601 - boot_time_1601) > WRAP_TIME_MILLIS) || updateBootTime) {
// Need to reset boot time
DWORD since_boot_millis = GetTickCount();
boot_time_1601 = current_time_1601 - since_boot_millis;
|