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
]
- To: chrony-dev@xxxxxxxxxxxxxxxxxxxx
- Subject: Re: [chrony-dev] [PATCH v2 5/6] leapdb: support leap-seconds.list as second source
- From: Miroslav Lichvar <mlichvar@xxxxxxxxxx>
- Date: Wed, 6 Dec 2023 14:48:27 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701870510; 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=+uK2/W0MTf+sdwT0ZmoFq6KJaR0CBXftIZTJyL2V49Y=; b=B5R6Q2buGOzB0037ylLvFv4Ah6xv3LibBK0GhfMFIF6K8OjDOgmjPcaVHQgABgwKI+qZjs EnXbdipBnwPCmS0smg7l0YwR/RD1381Jo3zLB79rYZGPezpBPKqoqGi/9c78402aszDYvB SdWIW2WWYGe0IUZncGdZDPjZHQGBavQ=
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.
--
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.