Defines the methods for the timer interface.
- Note
- SW Release Applicability: These APIs are available in both NVIDIA DriveWorks and NVIDIA DRIVE Software releases.
◆ dwTimerHandle_t
◆ dwTimerWork
typedef void(* dwTimerWork) (void *) |
◆ dwTimer_cancelAsync()
Asynchronously cancels all scheduled work associated with this timer.
- Parameters
-
[in] | timer | A handle to the timer |
- Returns
- DW_INVALID_HANDLE - if provided context handle is invalid,i.e. null or of wrong type
DW_SUCCESS
◆ dwTimer_cancelSync()
Synchronously cancels all scheduled work associated with this timer.
This call will allow pending work to complete for cancelling the job.
- Parameters
-
[in] | timer | A handle to the timer |
- Returns
- DW_INVALID_HANDLE - if provided context handle is invalid,i.e. null or of wrong type
DW_SUCCESS
◆ dwTimer_initialize()
Creates and initializes a DW Timer.
This method creates a timer instance and registers it with the primary time source for the context.
- Parameters
-
[out] | timer | A pointer to the timer handle |
[in] | timerName | Name of the timer, which will be associated with the created thread. |
[in] | context | Specifies the handle to the context under which the timer should be created. |
- Returns
- DW_INVALID_ARGUMENT - if pointer to the timer handle is NULL.
DW_INVALID_HANDLE - if provided context handle is invalid,i.e. null or of wrong type
DW_SUCCESS
◆ dwTimer_release()
Release the timer instance.
- Parameters
-
[in] | timer | The timer handle |
- Returns
- DW_INVALID_ARGUMENT - if pointer to the timer handle is NULL.
DW_SUCCESS
◆ dwTimer_scheduleTaskOneShot()
Scheduled a task to be run at a future time (non-recurring)
- Parameters
-
[in] | task | Function pointer for the task to be executed |
[in] | clientData | Pointer to data to be passed back to task |
[in] | startTime | Time when the task should be activated |
[in] | timer | Handle to the timer object |
- Returns
- DW_INVALID_HANDLE - if provided context handle is invalid,i.e. null or of wrong type
DW_SUCCESS
◆ dwTimer_scheduleTaskRecurring()
Scheduled a task to be run at a future time (recurring)
- Parameters
-
[in] | task | Function pointer for the task to be executed |
[in] | clientData | Pointer to data to be passed back to task |
[in] | startTime | Time when the task should be activated |
[in] | period | Period at which to fire the task |
[in] | timer | Handle to the timer object |
- Returns
- DW_INVALID_HANDLE - if provided context handle is invalid,i.e. null or of wrong type
DW_SUCCESS