Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

monotonic [clock millis] and [after]?

69 views
Skip to first unread message

Petro Kazmirchuk

unread,
Jul 7, 2021, 4:43:05 PM7/7/21
to
the subject pretty much says it all. Probably, it is not part of the core, but is there an extension that provides monotonic [clock millis] i.e. independent of DST adjustments? (analogous to Python's time.monotonic)
My use case is very simple: I'm connecting to a TCP server, and in case the connection fails, I'd like to wait a bit before connecting again. I noticed the ancient TIP 302, but it is talking only about [after], and in any case I need it in Tcl 8.6
Or can I work around it myself using only Tcl? I'm writing an open source extension that is supposed to be pure Tcl, no C code.
thanks in advance

Robert Heller

unread,
Jul 7, 2021, 5:22:21 PM7/7/21
to
clock milliseconds

man 3tcl clock

>
>

--
Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
Deepwoods Software -- Custom Software Services
http://www.deepsoft.com/ -- Linux Administration Services
hel...@deepsoft.com -- Webhosting Services

Petro Kazmirchuk

unread,
Jul 8, 2021, 6:19:42 AM7/8/21
to
indeed I didn't realize [clock seconds/milliseconds] is not affected by DST, silly me :)

Donal K. Fellows

unread,
Jul 17, 2021, 4:29:59 AM7/17/21
to
On Wednesday, 7 July 2021 at 21:43:05 UTC+1, Petro Kazmirchuk wrote:
> the subject pretty much says it all. Probably, it is not part of the core, but is there an extension that provides monotonic [clock millis] i.e. independent of DST adjustments?

The real issue isn't whether DST adjustments will have an impact (they shouldn't; timezones are about how timestamps are rendered, not when they are) but whether actually altering the clock will have an impact. I don't have a significant problem with my own stuff because I always enable NTP on my systems (limiting clock drift) but I understand that's not practical for all.

Donal.
0 new messages