←back to thread

189 points GordonS | 5 comments | | HN request time: 0.95s | source
1. msla ◴[] No.19534075[source]
I'd be happy with everyone being extremely clear about the two kinds of time: Wallclock-time and duration-time.

What's the difference? Duration-time does not have leap-seconds.

I'll say it again: Duration-time does not have leap-seconds.

Once more: Duration-time does not have leap-seconds.

For duration-time without leap-seconds, give me TAI:

> International Atomic Time (TAI) is a statistical atomic time scale based on a large number of clocks operating at standards laboratories around the world that is maintained by the Bureau International des Poids et Mesures; its unit interval is exactly one SI second at sea level. The origin of TAI is such that UT1-TAI is approximately 0 (zero) on January 1, 1958. TAI is not adjusted for leap seconds. It is recommended by the BIPM that systems which cannot handle leapseconds use TAI instead.

https://tycho.usno.navy.mil/leapsec.html

Document that it is TAI.

Include in the documentation that TAI does not include leap-seconds.

Thank you.

replies(2): >>19534286 #>>19535401 #
2. ◴[] No.19534286[source]
3. gsich ◴[] No.19535401[source]
Why do you call it "duration-time"? It seems obvious that for an event that lasted 5.43s for example, (a "duration", better wording) that it's not counted with leap-seconds.
replies(1): >>19535650 #
4. msla ◴[] No.19535650[source]
> Why do you call it "duration-time"?

Because it has units of time (seconds, often) and it's done using time-stamps, as in begin-time and end-time.

> It seems obvious that for an event that lasted 5.43s for example, (a "duration", better wording) that it's not counted with leap-seconds.

Obvious until you try to get someone to understand why their time-stamps can't be UTC if they're going to be used for duration-time instead of wallclock-time.

Obvious until you try to get a library or language implementer to understand the UTC isn't Universal.

replies(1): >>19535764 #
5. gsich ◴[] No.19535764{3}[source]
>Because it has units of time (seconds, often) and it's done using time-stamps, as in begin-time and end-time.

If you are recording a duration you have another unit. If you use begin-time and end-time you are calculating a duration, which is different of course.

If you calculate durations, then you might consider leap seconds, if they are important for your measurement. If not, then you just ignore them. I don't see a problem here.

Besides, leap-seconds are known, so removing them from a calculated duration is not a problem.