NVIDIA DRIVE OS Linux API Reference

5.1.0.2 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ote_tsc.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
3  *
4  * NVIDIA Corporation and its licensors retain all intellectual property
5  * and proprietary rights in and to this software and related documentation
6  * and any modifications thereto. Any use, reproduction, disclosure or
7  * distribution of this software and related documentation without an express
8  * license agreement from NVIDIA Corporation is strictly prohibited.
9  */
10 
27 #ifndef __OTE_TSC_H
28 #define __OTE_TSC_H
29 
30 #include <service/ote_rtc.h>
31 
41 
53 
68 te_error_t ote_tsc_get_msecs(uint64_t *tsc_msecs);
69 
84 te_error_t ote_tsc_get_usecs(uint64_t *tsc_usecs);
85 
86 
87 inline te_error_t ote_tsc_init(void) {
88  return ote_rtc_init();
89 }
90 
91 inline te_error_t ote_tsc_deinit(void) {
92  return ote_rtc_deinit();
93 }
94 
95 inline te_error_t ote_tsc_get_msecs(uint64_t *tsc_msecs) {
96  return ote_rtc_get_time_msecs(tsc_msecs);
97 }
98 
99 inline te_error_t ote_tsc_get_usecs(uint64_t *tsc_usecs) {
100  return ote_rtc_get_time_usecs(tsc_usecs);
101 }
102 
103 #endif
104 
te_error_t ote_tsc_get_usecs(uint64_t *tsc_usecs)
Gets the current value of the TSC in microseconds.
Definition: ote_tsc.h:99
te_error_t ote_tsc_init(void)
Initializes the TSC hardware.
Definition: ote_tsc.h:87
te_error_t ote_tsc_get_msecs(uint64_t *tsc_msecs)
Gets the current value of the TSC in milliseconds.
Definition: ote_tsc.h:95
te_error_t
Defines Open Trusted Environment (OTE) error codes.
Definition: ote_error.h:45
te_error_t ote_tsc_deinit(void)
Deinitializes the TSC hardware.
Definition: ote_tsc.h:91