TIMEOUT(9)

NAME
timeout, untimeout - execute a function after a specified length of time

SYNOPSIS
void
timeout(void (*fnt)(void *), void *arg, int ticks);
void
untimeout(void (*fnt)(void *), void *arg);

DESCRIPTION
The function timeout() schedules a call to the function given by the argument fnt to take place after ticks/hz seconds. Non-positive values of ticks are silently converted to the value ‘1’. fnt should be a pointer to a function that takes a void * argument, in which the timeout() argument arg will be passed.

The function untimeout() cancels the first scheduled call (i.e. the one with the shortest delay left) that matches the <fnt,arg> pair. If a match can not be found in the callout queue, nothing happens.

SEE ALSO
hz(9)

BUGS
untimeout() should probably remove all matches from the queue.