On 09/13/2011 10:32 AM, Gerald W. Lester wrote:
> Ralf, are you aware that Kevin Kenny (the person you replied to) did
> most of the rewrite for the clock command in 8.5?
>
> In other words, I'd trust Kevin before the man page on this one.
Uh, what Gerald said. :)
I wrote the underlying code that 8.4 uses to implement [clock clicks
-milliseconds] - and the Tcl procedure that I supplied works correctly
on both Unix and Windows. [clock clicks] without -milliseconds will
*not* synchronize correctly without more work; see TIP 7 for the
details of disciplining the two oscillators.
The only way in 8.4 that the milliseconds *don't* stay in sync with
the seconds is that the milliseconds are kept in a 32-bit field.
Every 2**32 milliseconds (roughly every 49.7 days), the field overflows
from 2**31-1 to -2**31. The code that I posted in the earlier mail
handles this condition correctly by recognizing that the 32-bit
field is actually the least significant 32 bits of "milliseconds
since the Epoch" and acting accordingly. It works.
It depends on a promise that the documentation doesn't make, but
the code is what it is, and the 8.4 code isn't going to change at
this late date.
8.5 does promise that the milliseconds stay in synchrony with the
seconds. (The procedure will continue to work in 8.5; it just does
needless work checking for nonexistent 2**32-millisecond rollovers.)