MSTOHZ(9)              NetBSD Kernel Developer's Manual              MSTOHZ(9)


NAME
mstohz, hztoms -- convert between milliseconds and system clock ticks
SYNOPSIS
#include <sys/param.h> unsigned int mstohz(unsigned int ms); unsigned int hztoms(unsigned int hz);
DESCRIPTION
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 millisec- onds. 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.
RETURN VALUES
The return value is either the number of clock ticks or milliseconds for the specified value.
SEE ALSO
param(3), callout(9), tvtohz(9)
BUGS
Neither mstohz() nor hztoms() make use of expensive 64-bit integer arith- metic. The result from mstohz() will be rounded down to one second if the parameter is larger than 131072 milliseconds. NetBSD 9.0 September 28, 2019 NetBSD 9.0

You can also request any man page by name and (optionally) by section:

Command: 
Section: 
Architecture: 
Collection: 
 

Use the DEFAULT collection to view manual pages for third-party software.


Powered by man-cgi 1.15, Panagiotis Christias
Modified for NetBSD by Kimmo Suominen