Function

CFRunLoopAddTimer

Adds a CFRunLoopTimer object to a run loop mode.

Declaration

void CFRunLoopAddTimer(CFRunLoopRef rl, CFRunLoopTimerRef timer, CFRunLoopMode mode);

Parameters

rl

The run loop to modify.

timer

The run loop timer to add.

mode

The run loop mode of rl to which to add timer. Use the constant kCFRunLoopCommonModes to add timer to the set of objects monitored by all the common modes.

Discussion

A run loop timer can be registered in only one run loop at a time, although it can be added to multiple run loop modes within that run loop.

If rl already contains timer in mode, this function does nothing.

See Also

Managing Timers

CFRunLoopGetNextTimerFireDate

Returns the time at which the next timer will fire.

CFRunLoopRemoveTimer

Removes a CFRunLoopTimer object from a run loop mode.

CFRunLoopContainsTimer

Returns a Boolean value that indicates whether a run loop mode contains a particular CFRunLoopTimer object.