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 16:46:07 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694443573; 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=/cjMLsKsX9cK0RWi5NssHAF+QNelVOtm/gPEblRHzuE=; b=SeSFTO7ul6P6bFv2DGUF4A086/leMyoI808juZZaeoC4MtIc2DdjH0Iv6V1y80Kbj+VYlL GkioZE5rA/wk27U+n3ydSqwHBfKGvBlCXVvgrwGafmXkZCZNmsUj3tWs4fZOoOCTMSQaof NsU4KEwzpPdIrJrOIiXu5+vS84xJmnU=
On Mon, Sep 11, 2023 at 08:03:49AM -0400, Josef 'Jeff' Sipek wrote:
> On Mon, Sep 11, 2023 at 10:29:30 +0200, Miroslav Lichvar wrote:
> > That timestamp doesn't need much resolution. It just says when the
> > offset (in double format) was captured. Milliseconds would be fine.
>
> Ok. I just saw that the code uses that the timestamp and the offset to
> calculate the time (for non-PPS sources) and it seemed desirable to get more
> than microsecond resolution for that before it gets fed into RCL_AddSample.
> In other words, this timestamp indirectly affects the resolution of the
> sample fed in.
It's converted to timespec and then back to double after applying the
offset option. The resolution of the original timestamp doesn't
impact the resolution of the offset. It is effectively handled in
nanosecond resolution.
--
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.