Contents

CFRunLoopAddTimer(_:_:_:)

Adds a CFRunLoopTimer object to a run loop mode.

Declaration

func CFRunLoopAddTimer(_ rl: CFRunLoop!, _ timer: CFRunLoopTimer!, _ mode: CFRunLoopMode!)

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 Commonmodes 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