The
mstohz() macro can be used to convert time in milliseconds to system clock ticks, as used by the
callout(9) facility, in an integer-overflow safe way. Conversely,
hztoms() converts system clock ticks to milliseconds.
These macros are defined in the
<sys/param.h> header. Individual ports can have a processor-specific, more efficient version implemented in their
<machine/param.h> header as a define.