DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

udi_timer_start_repeating(3udi)


Start a repeating timer

SYNOPSIS

#include <udi.h>

void udi_timer_start_repeating (

	udi_timer_tick_call_t *callback,

	udi_cb_t *gcb,

	udi_time_t interval );
 
typedef void udi_timer_tick_call_t (

	void *context,

	udi_ubit32_t nmissed );
 

ARGUMENTS callback, gcb are standard arguments described in the "Asynchronous Service Calls" section of "Calling Sequence and Naming Conventions".

interval is the repeating period for this timer (see udi_timer_start). For udi_timer_start_repeating, interval must be greater than zero.

context is the context pointer from the original control block, gcb.

nmissed is the number of timeout callbacks missed.

DESCRIPTION udi_timer_start_repeating behaves like udi_timer_start except that the callback routine is called repeatedly at each successive occurrence of interval. Repeated callbacks are timed relative to the original starting time, rather than the last callback time.

Each time the specified interval timeout period has elapsed (within system timer resolution capability) the callback function is called. If the callback routine is currently scheduled or active or the environment otherwise is unable to call the callback on schedule, the environment will increment an internal counter representing the number of missed timeout calls for a particular timeout control block. This missed timeout count is passed to the callback function as the nmissed argument; this indicator allows the driver to determine if it has missed callbacks and take appropriate action. The nmissed value will only reflect missed callbacks since the last delivered callback. After a missed callback, the next callback may be delivered any time between the scheduled time of the missed callback and the normally scheduled time for the next callback.

The repeating timer can be stopped by calling udi_timer_cancel from either the callback timeout routine or from other code within the region that started the timer with the original control block.

Unlike other callback functions, udi_timer_tick_call_t does not pass the control block back to the driver, since it remains busy until the repeating timer is cancelled with udi_timer_cancel.

REFERENCES udi_time_t, udi_limits_t, udi_cb_alloc, udi_timer_cancel


UDI Core Specification Contents