Skip to content
Tcl Source Code Artifact [186f1d605b]
Login

Artifact [186f1d605b]

Artifact 186f1d605b53da58a2f434656c7c630b2d1b4d4a72823c3e1f7fa4e198b2503e:

Ticket change [186f1d605b] - Ticket [b7b707a310ea42e9|b7b707a310] <i>[win32] NRT-only - NativeGetTime backwards time-drifts bug (fixed)</i> status still Open with 3 other changes by sebres on 2026-09-14 00:12:57.
D 2026-09-14T00:12:57.298
J icomment I\swanted\sto\sadd\sanother\snew\smonotonic\stest\scase\sto\sclock.test\s(to\scover\sin-sync-ticking\swith\smicroseconds):\r\n<code><pre\sstyle="margin-left:15pt">\r\ntest\sclock-33.13\s{clock\stest,\smonotonic\sticks\sin\ssync\swith\smicroseconds\s(compiled\sonly)}\s{\r\n\s\s\s\slassign\s[::testClock::aligned-times\smicroseconds\smonotonic]\st1\st2\r\n\s\s\s\sset\stime\s[expr\s{$t1\s-\s$t2}];\s#\smicroseconds\salignment\r\n\s\s\s\stimerate\s{}\s1;\s#\sshort\sbut\sprecise\sbusy\swait\r\n\s\s\s\slassign\s[::testClock::aligned-times\smicroseconds\smonotonic]\st1\st2\r\n\s\s\s\sif\s{\s$t2\s+\s$time\s!=\s$t1\s}\s{\r\n\t::tcltest::Skip\s"timing\sissue";\s#\sdid\swe\sexperience\stime\sdrift?\r\n\s\s\s\s}\r\n}\s{}\r\n</pre></code>\r\n\r\nBut\san\sattempt\sto\stest\sits\sstability\sfailed\son\swindows\s(I\sguess\sbecause\sof\sdrifting\sthrough\scalibration):\r\n<code><pre\sstyle="margin-left:15pt">\r\ntimerate\s{\r\n\s\s\s\slassign\s[::testClock::aligned-times\smicroseconds\smonotonic]\st1\st2\r\n\s\s\s\sset\stime\s[expr\s{$t1\s-\s$t2}];\s#\smicroseconds\salignment\r\n\s\s\s\stimerate\s{}\s1;\s#\sshort\sbut\sprecise\sbusy\swait\r\n\s\s\s\slassign\s[::testClock::aligned-times\smicroseconds\smonotonic]\st1\st2\r\n\s\s\s\sif\s{\s$t2\s+\s$time\s-\s$t1\s!=\s0\s}\s{\r\n\t::tcltest::Skip\s"timing\sissue\s([expr\s{abs($t2\s+\s$time\s-\s$t1)}]\s>\s0)";\s#\sdid\swe\sexperience\stime\sdrift?\r\n\s\s\s\s}\r\n}\s3000\r\n</pre></code>\r\nThe\smicroseconds\ssporadically\sdrifting\s1ms\sor\s2ms\scompared\sto\smonotonic\stime.\r\n\r\nI\scannot\sreproduce\sit\sin\smy\sfork\swith\s[fdfbd5e10]\sintegrated\s(I\salso\snever\ssaw\smicroseconds\sdrifts\sthere).<br/>\r\nSo\sI'll\stry\sto\spartially\sbackport\stclWinTime.c\senhancement\s(inlined\scalibration\sfor\swall\sclock\swithout\scalibration\sthread).
J login sebres
J mimetype text/x-fossil-wiki
K b7b707a310ea42e9f1b29954ee8ca13ae91ccabe
U sebres
Z 81a20575b7380c367a3448e016a8c24c