Index | Thread | Search

From:
Theo Buehler <tb@theobuehler.org>
Subject:
Re: bgpd: better monotime handling
To:
Claudio Jeker <cjeker@diehard.n-r-g.com>
Cc:
tech@openbsd.org
Date:
Thu, 20 Feb 2025 16:55:11 +0100

Download raw body.

Thread
On Thu, Feb 20, 2025 at 01:50:32PM +0100, Claudio Jeker wrote:
> I wanted to increase the resolution of getmonotime to milliseconds as a
> quick way to get a but higher resolution. tb@ convinced me to make this
> better so that times are not easily confused.
>
> So here is that diff. monotime_t is now a new type (wrapped into a struct
> to prevent integer promotion). The resolution is now actually microseconds
> which should be good enough.
> 
> This adds enough helper functions to work with monotime_t which was
> inspired by things like timeradd(3).
> 
> Regress still passes and also my limited testing showed no issues.

I like this a lot better. No further nits.

ok tb