Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Jan 2004 07:34:27 +0100
From:      "Poul-Henning Kamp" <phk@phk.freebsd.dk>
To:        Mike Silbersack <silby@silby.com>
Cc:        arch@freebsd.org
Subject:   Re: Updating callout_reset 
Message-ID:  <62080.1075098867@critter.freebsd.dk>
In-Reply-To: Your message of "Sun, 25 Jan 2004 23:29:33 CST." <20040125230314.S730@odysseus.silby.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <20040125230314.S730@odysseus.silby.com>, Mike Silbersack writes:

>In order to ensure that modules and the like do not break, I would like to
>propose that we leave callout_reset defined as is and create a new
>function, callout_set (or some other clever name) which takes a struct
>*timespec in place of ticks.

No, not timespec.

Timespecs are stupid, slow, clumsy and unhandy and cumbersome.

With a timespec you either need an MPunsafe hack function like
libevents evConsTime() or a local stack variable.

Make it a 64bit count of nanoseconds instead that way it can be
used as a literal constant.

It's OK with me if we want to have a function to contain the "*
1000000000LL" factor for us, and maybe even convenience functions
for milli and microseconds.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?62080.1075098867>