timecounting: add getbinruntime(), getnsecruntime()
authorcheloha <cheloha@openbsd.org>
Tue, 13 Dec 2022 17:30:36 +0000 (17:30 +0000)
committercheloha <cheloha@openbsd.org>
Tue, 13 Dec 2022 17:30:36 +0000 (17:30 +0000)
commit6fba7c695c88ce551cbfb5461cad0d4f29e0d23b
tree3af2639b241f0bf6e40c78c8c2f61bd195f3de15
parentaea2e2f981416baedf2f6f9e7ede41f243a496a6
timecounting: add getbinruntime(), getnsecruntime()

The networking people want a fast, monotonic clock that only advances
while the system is not suspended.  The runtime clock satisfies most
of these requirements, so introduce getnsecruntime() to provide a fast
means for reading it.

Based on patches from jca@ and claudio@.

ok yasuoka@
sys/kern/kern_tc.c
sys/sys/time.h