Re: [chrony-dev] [PATCH v2 5/6] leapdb: support leap-seconds.list as second source

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-dev Archives ]


On Thu, Dec 7, 2023 at 12:48 AM Miroslav Lichvar <mlichvar@xxxxxxxxxx> wrote:
>
> On Thu, Nov 30, 2023 at 02:23:28PM +1100, patrick.oppenlander@xxxxxxxxx wrote:
> > +/* Leap second database */
> > +struct leapdb {
> > +  long long updated;
> > +  long long expiry;
> > +  size_t len;
> > +  struct leap {
> > +    long long when;
> > +    int tai_offset;
> > +  } leap[];
> > +};
>
> Please avoid saving the data in memory. I think the requested leap can
> be found in one pass over the file. Simpler is better.

Agreed, simple is good. Thanks for the feedback, I'll prepare a v3.

Patrick

> --
> 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.
>

--
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.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/