Contents

SetEnableWithCompletion

Enables or disables the timer.

Declaration

virtual kern_return_t SetEnableWithCompletion(bool enable, IODispatchSourceCancelHandler handler);

Parameters

  • enable:

    A Boolean value that indicates whether to enable or disable the timer. Specify True to enable the timer or False to disable it.

  • handler:

    An optional block to execute after any pending handlers of a newly disabled timer finish executing.

Return Value

kIOReturnSuccess on success, or another value if an error occurs. See Error Codes.

See Also

Starting and Stopping the Timer Source