updates to seconds(9) Reference: /n/atom/patch/applied/seconds9 Date: Sun Jun 8 12:28:23 CES 2014 Signed-off-by: quanstro@quanstro.net --- /sys/man/9/seconds Sun Jun 8 12:28:19 2014 +++ /sys/man/9/seconds Sun Jun 8 12:28:19 2014 @@ -1,6 +1,6 @@ .TH SECONDS 9 .SH NAME -seconds, ticks, fastticks, HZ, MS2HZ, MS2TK, TK2MS, TK2SEC \- kernel times and time conversions +seconds, ticks, tickscmp, ms2tk, tk2ms, fastticks, HZ, MS2HZ, MS2TK, TK2MS, TK2SEC \- kernel times and time conversions .SH SYNOPSIS .ta \w'\fL#define 'u .B @@ -10,8 +10,19 @@ m->ticks .br MACHP(0)->ticks +.br +sys->ticks (nix only) .PP .B +long tickscmp(ulong, ulong) +.br +.B +ulong tk2ms(ulong) +.br +.B +ulong ms2tk(ulong) +.br +.B vlong fastticks(uvlong *hz) .PP .EX @@ -39,6 +50,14 @@ .B MACHP(0) is sometimes used to provide a reference time, since the tick value might vary slightly across processors. +.I Tickscmp +compares tick values, accounting for wrap around. +The fuctions +.I tk2ms +and +.I ms2tk +are specialized versions of the upper case macros below, which +avoid overflow at the potential cost of speed and precision. .PP .I Fastticks returns the number of ticks since boot as measured by the