Artifacts Associated With Ticket 1567838
Ticket change [53db0226dc] (rid 93826) by ccdrbrg on 2006-09-29 15:44:18:
- assignee initialized to: "kennykb"
- cmimetype initialized to: "text/plain"
- comment initialized to:
System: Windows XP SP2 running tcl/tk 8.4.1 from cygwin. Posted on comp.lang.tcl by ccdrbrg (Thurs, Sep 28 2006 9:07 am) I have written a simple ISO 8601 format clock display (source below). I have noticed the time value will creep ahead of the system time by as much as 30 seconds each day running. I do not understand why. I believe [clock seconds] queries the system time and is evaluated each time the after event is triggered. The fact that the displayed time gets ahead of the system time is strange. Any help would be much appreciated. Chad System: Windows XP running tcl/tk 8.4.1 from cygwin. Source: variable date; proc iso8601date { } { global date; set seconds [clock seconds]; set date [clock format ${seconds} -gmt 1 -format {%Y-%m-%dT%TZ}]; after 500 iso8601date; }; iso8601date; package require Tk; wm protocol . WM_DELETE_WINDOW { exit }; wm title . "ISO8601 Date"; label .l -textvariable date -font {Arial 12 bold}; pack .l -padx 20; wm resizable . 0 0; bind .l <Double-Button-1> { clipboard clear; clipboard append [.l cget -text]; }; Reply from Kevin Kenny (Thurs, Sep 28 2006 9:18 pm) There's something gone wrong with the high-resolution timer and the way we synchronize that to the system clock. Please log a bug on this at SourceForge. It may be a few weeks before I can give it a proper look, because I have travel coming up. - foundin initialized to: "None"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "ccdrbrg"
- subsystem initialized to: "03. Timer Events"
- title initialized to: "Clock Creep using [after] on Windows"
- type initialized to: "Bug"
Ticket change [e423663f2d] (rid 259788) by serhiy.storchaka on 2026-10-21 11:01:37:
- icomment:
This was a calibration problem of the Windows high-resolution clock. It has been reworked since: [b6fc234ef3] (ticket [b87ad7e914], in 8.6.7) fixed time drifts and jumps caused by <tt>Tcl_GetTime()</tt> calls disturbing the calibration data, and [f6637d3dd8] (in 8.6.10) reworked the calibration cycle for smoother drifting toward the system time. Both are in all maintained versions. Not reproduced by me; please reopen if it still happens with 8.6.10 or later.
- login: "serhiy.storchaka"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- icomment:
Ticket change [70178015bd] (rid 260054) by serhiy.storchaka on 2026-10-22 17:19:32:
- closedate changed to: "2461334.9594611805"
- closer changed to: "serhiy.storchaka"
- login: "serhiy.storchaka"