IP_TimerTime

IP_TimerTime — adjusts timer parameters.

Syntax

#include <cogent.h>
int IP_TimerTime(timer_t  timer,
 int  absolute,
 time_t  init_sec,
 time_t  init_nsec,
 time_t  interval_sec,
 time_t  interval_nsec);

Arguments

timer

A timer ID, as returned by IP_PulseTimed.

absolute

1 for absolute time, 0 for relative.

init_sec

Seconds of delay prior to the first timer expiry.

init_nsec

Nanoseconds of delay prior to the first timer expiry.

interval_sec

Seconds of delay for subsequent timing intervals.

interval_nsec

Nanoseconds of delay for subsequent timing intervals.

Returns

0 on success, or -1 on failure and errno is set.

Description

This function changes the times associated with the timer. If absolute is non-zero, then the init_sec and init_nsec fields are treated as the number of seconds and nanoseconds since 12:00 a.m. Jan 1, 1970 UTC. Otherwise, init_sec and init_nsec are treated as an offset from the current time.

See Also

Pulses and Timers, IP_PulseTimed