Re: [chrony-dev] SOCK refclock system time resolution |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-dev Archives
]
- To: chrony-dev@xxxxxxxxxxxxxxxxxxxx
- Subject: Re: [chrony-dev] SOCK refclock system time resolution
- From: Miroslav Lichvar <mlichvar@xxxxxxxxxx>
- Date: Mon, 11 Sep 2023 10:29:30 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694420973; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=LERKa4/7BYbyG+j8Z0JFDekxHSiMUIePBdrWY2pAl+s=; b=UHiGQTYe6hPoDKBBPpznjsMDblZY+BRoj4ggD754KEDDybvwmhuuk26p3Cb7e7xpUddyse gG5SR/wMhjDYGdSAQ1CmNwC49YnHLmK/CMimksgXjM7RIOn6ameWbmupvNVhywDH05NpKs Mhpb34Jll9C6XBRENLbIhRUehy4Xab4=
On Fri, Sep 08, 2023 at 11:21:08AM -0400, Josef 'Jeff' Sipek wrote:
> I'm playing with feeding data to the SOCK refclock with GPS time myself
> (without using gpsd, etc.). I saw that the samples contain the host/system
> timestamp as a struct timeval. I changed it to allow nanosecond time of
> measurements but before I try to polish it and send it for inclusion, I
> wanted to check if there would there be interest in that? The current diff
> is below, but it needs a bit more cleanup and testing.
That timestamp doesn't need much resolution. It just says when the
offset (in double format) was captured. Milliseconds would be fine.
The code was written when chrony was still internally using timeval.
If it was written today, timespec would be the obvious choice, but
switching now I think would just create unnecessary work for the
applications and more code to maintain.
--
Miroslav Lichvar
--
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble? Email listmaster@xxxxxxxxxxxxxxxxxxxx.