OpenBSD manual page server

Manual Page Search Parameters

TVTOHZ(9) Kernel Developer's Manual TVTOHZ(9)

tvtohz, tstohztranslate time period to timeout delay

#include <sys/types.h>
#include <sys/time.h>
#include <sys/systm.h>

int
tvtohz(const struct timeval *tv);

int
tstohz(const struct timespec *ts);

The () and () functions return the number of ticks in the specified amount of time. If the return value would exceed the maximum value representable by an int, it is capped at INT_MAX. They are mainly used to translate a timeval or timespec, respectively, into a suitable argument for tsleep(9).

These functions are implemented in the file sys/kern/kern_clock.c.

hz(9), timeout(9)

January 18, 2019 OpenBSD-6.8