👤
Home Man
Search
Today's Posts
Register

Linux & Unix Commands - Search Man Pages
Man Page or Keyword Search:
Select Section of Man Page:
Select Man Page Repository:

NetBSD 6.1.5 - man page for mstohz (netbsd section 9)

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

NAME
     mstohz, hztoms -- convert between milliseconds and system clock ticks

SYNOPSIS
     #include <sys/param.h>

     int
     mstohz(int ms);

     int
     hztoms(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() con-
     verts system clock ticks to milliseconds.

     These macros are defined in the <sys/param.h> header.  Individual ports can have a proces-
     sor-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 arithmetic.  The result
     from mstohz() will be rounded down to one second if the parameter is larger than 131072 mil-
     liseconds.

BSD					 October 20, 2011				      BSD


All times are GMT -4. The time now is 04:40 AM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.
×
UNIX.COM Login
Username:
Password:  
Show Password