Back to libut API Reference


SYNOPSIS

   #include "libut/ut.h"
   int UT_tmr_clear( char *name );


DESCRIPTION

This function cancels a pending timer. The timer is specified by name. It must have been previously created with UT_tmr_set(3).

This function is only necessary to cancel a timer prior to its expiration. If instead you want to clear the timer when it expires, so that it does not recur, the timer callback's return value is sufficient to control this. See UT_tmr_set(3).


RETURN VALUE

On success, 0 is returned. If no timer with the name exists, -1 is returned.


RELATED CONTROL PORT COMMANDS

The tmr control port command lists the pending timers.


SEE ALSO

UT_tmr_set(3)


AUTHOR

Troy D. Hanson <thanson@users.sourceforge.net>