2011/10/2 Lev Serebryakov <l...@freebsd.org>:
> Hello, Freebsd-hackers.
>
>  What should I use to measure short intervals of time between events
> in kernel? I don't need any "time" in means of, for example, time(3)
> API, but some monotonically and uniformly increasing counter with
> known frequency. As cheap as possible, without complex calculations :)

There are several global variables that may suffice.

'ticks' is the current tick value.
'time_second' is the current time in seconds, but this is adjusted
when the system time is changed.
'time_uptime' is the current uptime in seconds and is the base upon
which time_second is computed, depending on the system clock.

Cheers,
matthew
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Reply via email to