NVIDIA DriveOS Linux SDK API Reference

7.2.5.0 Early Access Release
Timer.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2017-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4  *
5  * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
6  * property and proprietary rights in and to this material, related
7  * documentation and any modifications thereto. Any use, reproduction,
8  * disclosure or distribution of this material and related documentation
9  * without an express license agreement from NVIDIA CORPORATION or
10  * its affiliates is strictly prohibited.
11  */
12 
20 #ifndef DW_CORE_TIMER_H_
21 #define DW_CORE_TIMER_H_
22 
23 #include <dw/core/base/Exports.h>
24 #include <dw/core/base/Types.h>
25 #include <dw/core/base/Status.h>
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
42 typedef struct dwTimeSourceObject* dwTimeSourceHandle_t;
43 
47 typedef struct dwTimerObject* dwTimerHandle_t;
48 
52 typedef void (*dwTimerWork)(void* ptr);
53 
74 dwStatus dwTimer_initializeFromSource(dwTimerHandle_t* const timer, char8_t const* const timerName,
76 
91 
109 
127 
149 dwStatus dwTimer_scheduleTaskOneShot(dwTimerWork const task, void* const clientData,
150  dwTime_t const startTime, dwTimerHandle_t const timer);
151 
175 dwStatus dwTimer_scheduleTaskRecurring(dwTimerWork const task, void* const clientData,
176  dwTime_t const startTime, dwTime_t const period, dwTimerHandle_t const timer);
177 
180 #ifdef __cplusplus
181 }
182 #endif
183 #endif // DW_CORE_TIMER_H_
Types.h
dwTimer_cancelAsync
DW_API_PUBLIC dwStatus dwTimer_cancelAsync(dwTimerHandle_t const timer)
Asynchronously cancels all scheduled work associated with this timer.
dwTimer_initializeFromSource
DW_API_PUBLIC dwStatus dwTimer_initializeFromSource(dwTimerHandle_t *const timer, char8_t const *const timerName, dwTimeSourceHandle_t const source)
Creates a new DW timer.
Exports.h
dwTimer_scheduleTaskRecurring
DW_API_PUBLIC dwStatus dwTimer_scheduleTaskRecurring(dwTimerWork const task, void *const clientData, dwTime_t const startTime, dwTime_t const period, dwTimerHandle_t const timer)
Scheduled a task to be run at a future time (recurring)
dwTimerWork
void(* dwTimerWork)(void *ptr)
dwTimerWork is a timer schedule task callback function, input void* ptr passes the extra data to the ...
Definition: Timer.h:52
dwTime_t
int64_t dwTime_t
Definition: core/base/BasicTypes.h:65
source
const WFDPipeline const WFDSource source
Definition: wfdext.h:111
char8_t
char char8_t
Definition: core/base/BasicTypes.h:55
dwTimer_release
DW_API_PUBLIC dwStatus dwTimer_release(dwTimerHandle_t const timer)
Release the timer instance.
dwStatus
dwStatus
Status definition.
Definition: ErrorDefs.h:32
void
typedef void(WFD_APIENTRY PFNWFDBINDSOURCETOPIPELINEWITHTIMESTAMPNV)(const WFDDevice device
dwTimer_scheduleTaskOneShot
DW_API_PUBLIC dwStatus dwTimer_scheduleTaskOneShot(dwTimerWork const task, void *const clientData, dwTime_t const startTime, dwTimerHandle_t const timer)
Scheduled a task to be run at a future time (non-recurring)
Status.h
DW_API_PUBLIC
#define DW_API_PUBLIC
Definition: core/base/Exports.h:57
dwTimeSourceHandle_t
struct dwTimeSourceObject * dwTimeSourceHandle_t
Handle represents a TimeSource object.
Definition: Timer.h:42
dwTimerHandle_t
struct dwTimerObject * dwTimerHandle_t
Handle represents a Timer object.
Definition: Timer.h:47
dwTimer_cancelSync
DW_API_PUBLIC dwStatus dwTimer_cancelSync(dwTimerHandle_t const timer)
Synchronously cancels all scheduled work associated with this timer.