[Ntp] CLOCK_TAI (was NTPv5: big picture)

Hal Murray <hmurray@megapathdsl.net> Sat, 02 January 2021 08:16 UTC

Return-Path: <hmurray@megapathdsl.net>
X-Original-To: ntp@ietfa.amsl.com
Delivered-To: ntp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2056E3A0EFC for <ntp@ietfa.amsl.com>; Sat, 2 Jan 2021 00:16:09 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 1.036
X-Spam-Level: *
X-Spam-Status: No, score=1.036 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HELO_DYNAMIC_IPADDR=1.951, PDS_RDNS_DYNAMIC_FP=0.001, RDNS_DYNAMIC=0.982, SPF_HELO_NONE=0.001, SPF_NONE=0.001] autolearn=no autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id z4uT8NBYuOmb for <ntp@ietfa.amsl.com>; Sat, 2 Jan 2021 00:16:04 -0800 (PST)
Received: from ip-64-139-1-69.sjc.megapath.net (ip-64-139-1-69.sjc.megapath.net [64.139.1.69]) by ietfa.amsl.com (Postfix) with ESMTP id 9779E3A0EFB for <ntp@ietf.org>; Sat, 2 Jan 2021 00:16:04 -0800 (PST)
Received: from shuksan (localhost [127.0.0.1]) by ip-64-139-1-69.sjc.megapath.net (Postfix) with ESMTP id 1F63C40605C; Sat, 2 Jan 2021 00:16:03 -0800 (PST)
X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.3
To: Magnus Danielson <magnus@rubidium.se>
cc: Hal Murray <hmurray@megapathdsl.net>, ntp@ietf.org
From: Hal Murray <hmurray@megapathdsl.net>
In-Reply-To: Message from Magnus Danielson <magnus@rubidium.se> of "Fri, 01 Jan 2021 13:29:58 +0100." <e7d72afa-7cff-3158-f930-81d3510100a0@rubidium.se>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Date: Sat, 02 Jan 2021 00:16:03 -0800
Message-Id: <20210102081603.1F63C40605C@ip-64-139-1-69.sjc.megapath.net>
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/69jgaqgq914MUQZ76XnUKmQQ4xU>
Subject: [Ntp] CLOCK_TAI (was NTPv5: big picture)
X-BeenThere: ntp@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: <ntp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ntp>, <mailto:ntp-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ntp/>
List-Post: <mailto:ntp@ietf.org>
List-Help: <mailto:ntp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ntp>, <mailto:ntp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 02 Jan 2021 08:16:09 -0000

>> My (Linux) man page has various options for clock_gettime(), but
>> it doesn't say anything about leap seconds or TAI.  Yes, it should be
>> reasonable to add, but it's not there yet.

> Which only says that you should not trust your decision-making on what the
> man-page for a single command, it's not telling you the full story.

> So, there is CLOCK_TAI for starters. Then you also need to look at the
> nanokernel support, which is there, and the leap-second handling, leap-second
> information it does keep in the kernel. It's been there for fairly long now,
> that we can consider the Linux kernel to support it for all the versions we
> consider. All we need to do is keep supplying it with correct time and
> correct leap-second information.

Thanks for the heads up.

It's been in the Linux kernel for years.
       CLOCK_TAI (since Linux 3.10; Linux-specific)
              A nonsettable system-wide clock derived from wall-clock
              time but ignoring leap seconds.  This clock does not
              experience discontinuities and backwards jumps caused by
              NTP inserting leap seconds as CLOCK_REALTIME does.

It was recently added to the Linux Man Pages.  The new text is in Fedora 34, 
not in Fedora 33, not in Debian 10/buster.

It's not in NetBSD or FreeBSD.

A quick search for >CLOCK_TAI Windows< didn't find anything indicating it was 
implemented.



-- 
These are my opinions.  I hate spam.