addTimerEvent
Adds a TimerEvent callback for the given target called at least as often as specified in interval.
Declaration
virtual IOReturn addTimerEvent(
OSObject *target,
TimerEventevent,
AbsoluteTimeinterval);Parameters
- target:
This parameter is the target object of the TimerEvent.
- event:
The callback function called each time the timer fires.
- interval:
The callback will be called at least this often.
Return Value
Returns kIOReturnSuccess if the timer event was successfully added.
Overview
The frequency of the timer event callbacks will be the smallest interval specified by all targets. Only one interval and callback may be specified per target. If a addTimerEvent is called twice with the same target, the second one overrides the first. There is currently a bug triggered if the first call had the smallest interval. In that case, that smallest interval would still be used.
See Also
Miscellaneous
activateAudioEngine(IOAudioEngine *)activateAudioEngine(IOAudioEngine *, bool)attachAudioPortaudioEngineStartingaudioEngineStoppedcompletePowerStateChangecompletePowerStateChangeActiondeactivateAllAudioEnginesdetachAllAudioPortsdispatchTimerEventsflushAudioControlsfreegetCommandGategetPendingPowerStategetPowerStategetWorkLoopinitinitHardwareinitiatePowerStateChangeperformPowerStateChangeprotectedCompletePowerStateChangeprotectedSetPowerStateremoveAllTimerEventsremoveTimerEventsetConfigurationApplicationBundlesetDeviceCanBeDefaultsetDeviceNamesetDeviceShortNamesetFamilyManagePowersetIdleAudioSleepTimesetManufacturerNamesetPowerStatesetPowerStateActionstartstoptimerFiredwaitForPendingPowerStateChange