Differences From Artifact [088be13dc2]:
- File win/tclWinTime.c — part of check-in [f6637d3dd8] at 2017-05-23 21:57:13 on branch sebres-8-5-timerate — [win32] optimized calibration cycle (makes Tcl for windows "RTS" resp. NRT-capable): - the clock ticks never backwards (avoid it by negative drifts using comparison of times before and after calibration); - more precise, smooth/soft drifting (avoids too large drifts, already after 10 iterations the drift gets fewer as 0.1 microseconds); - because of more accurate drifting (aspire to the smallest difference), we can prolong calibration interval (up to 10 seconds by small tdiff-value); Closes ticket [b7b707a310ea42e9f1b29954ee8ca13ae91ccabe] "[win32] NRT-only - NativeGetTime backwards time-drifts bug" (user: sebres size: 43626)
To Artifact [65f9cc0b0f]:
- File win/tclWinTime.c — part of check-in [3aa1cefdf7] at 2017-07-03 13:25:01 on branch sebres-8-5-event-perf-branch — dynamic increase of timer resolution corresponding wait-time; non-blocking wait for event - if block-time set outside an event source traversal, use it as timeout, so can return with result 0 (no events); (user: sebres size: 43849)
| ︙ | |||
727 728 729 730 731 732 733 734 735 736 737 738 739 740 | 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 | + + + + + |
* If Tcl_Finalize was called from DllMain, the calibration thread is in a
* paused state so we need to timeout and continue.
*/
WaitForSingleObject(timeInfo.calibrationThread, 100);
CloseHandle(timeInfo.exitEvent);
CloseHandle(timeInfo.calibrationThread);
/*
* Reset timer resolution (shutdown case)
*/
(void)TclWinResetTimerResolution();
}
/*
*----------------------------------------------------------------------
*
* TclpGetTZName --
*
|
| ︙ | |||
1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 | 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 | + + + + + |
*/
waitResult = WaitForSingleObjectEx(timeInfo.exitEvent, 1000, FALSE);
if (waitResult == WAIT_OBJECT_0) {
break;
}
UpdateTimeEachSecond();
/*
* Reset timer resolution if expected (check waiter count once per second)
*/
(void)TclWinResetTimerResolution();
}
/* lint */
return (DWORD) 0;
}
/*
|
| ︙ |