Logo Search packages:      
Sourcecode: sofia-sip version File versions  Download package

SOFIAPUBFUN int su_timer_run ( su_timer_t t,
su_timer_f  wakeup,
su_timer_arg_t arg 

Set the timer for regular intervals.

Run the given timer continuously, call wakeup function repeately in the default interval. If a wakeup call is missed, try to make it up (in other words, this kind of timer fails miserably if time is adjusted and it should really use /proc/uptime instead of gettimeofday()).

While a continously running timer is active it must not be set using su_timer_set() or su_timer_set_at().

The timer must have an non-zero default interval.

tpointer to the timer object
wakeuppointer to the wakeup function
argargument given to the wakeup function
0 if successful, -1 otherwise.

Definition at line 444 of file su_timer.c.

References su_now(), su_timer_run(), su_timer_s::sut_duration, su_timer_s::sut_running, and su_timer_s::sut_woken.

Referenced by su_timer_run().

  su_timer_queue_t *timers = su_timer_queue(t, 1, "su_timer_run");

  if (timers == NULL)
    return -1;

  t->sut_running = run_at_intervals;
  t->sut_woken = 0;

  return su_timer_set0(timers, t, wakeup, arg, su_now(), t->sut_duration);

Here is the call graph for this function:

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index