NVIDIA DriveOS Linux NSR SDK API Reference

7.0.3.0 Release
Timer.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2017-2024 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 
28 #ifndef DW_CORE_TIMER_H_
29 #define DW_CORE_TIMER_H_
30 
31 #include <dw/core/base/Exports.h>
32 #include <dw/core/base/Types.h>
33 #include <dw/core/base/Status.h>
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
40 typedef struct dwTimeSourceObject* dwTimeSourceHandle_t;
42 typedef struct dwTimeSourceObject const* dwConstTimeSourceHandle_t;
43 
45 typedef struct dwTimerObject* dwTimerHandle_t;
47 typedef struct dwTimerObject const* dwConstTimerHandle_t;
49 typedef void (*dwTimerWork)(void* ptr);
50 
70 dwStatus dwTimer_initializeFromSource(dwTimerHandle_t* const timer, char8_t const* const timerName,
72 
87 
104 
121 
142 dwStatus dwTimer_scheduleTaskOneShot(dwTimerWork const task, void* const clientData,
143  dwTime_t const startTime, dwTimerHandle_t const timer);
144 
167 dwStatus dwTimer_scheduleTaskRecurring(dwTimerWork const task, void* const clientData,
168  dwTime_t const startTime, dwTime_t const period, dwTimerHandle_t const timer);
169 
170 #ifdef __cplusplus
171 }
172 #endif
173 
175 #endif // DW_CORE_TIMER_H_
dwTimeSourceHandle_t
struct dwTimeSourceObject * dwTimeSourceHandle_t
Handle represents a TimeSource object.
Definition: Timer.h:40
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)
dwConstTimeSourceHandle_t
struct dwTimeSourceObject const * dwConstTimeSourceHandle_t
Handle represents a const TimeSource object.
Definition: Timer.h:42
dwTimer_cancelAsync
DW_API_PUBLIC dwStatus dwTimer_cancelAsync(dwTimerHandle_t const timer)
Asynchronously cancels all scheduled work associated with this timer.
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:49
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)
dwTimer_release
DW_API_PUBLIC dwStatus dwTimer_release(dwTimerHandle_t const timer)
Release the timer instance.
dwTime_t
int64_t dwTime_t
Specifies a timestamp unit, in microseconds.
Definition: BasicTypes.h:54
source
const WFDPipeline const WFDSource source
Definition: wfdext.h:58
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.
char8_t
char char8_t
Definition: BasicTypes.h:47
dwConstTimerHandle_t
struct dwTimerObject const * dwConstTimerHandle_t
Handle represents a const Timer object.
Definition: Timer.h:47
void
typedef void(WFD_APIENTRY PFNWFDBINDSOURCETOPIPELINEWITHTIMESTAMPNV)(const WFDDevice device
dwTimer_cancelSync
DW_API_PUBLIC dwStatus dwTimer_cancelSync(dwTimerHandle_t const timer)
Synchronously cancels all scheduled work associated with this timer.
dwStatus
dwStatus
Status definition.
Definition: ErrorDefs.h:27
dwTimerHandle_t
struct dwTimerObject * dwTimerHandle_t
Handle represents a Timer object.
Definition: Timer.h:45
DW_API_PUBLIC
#define DW_API_PUBLIC
Definition: Exports.h:38