API Reference Manual  1.45.0
api/spec/time.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright (c) 2013-2018 Linaro Limited
3  * Copyright (c) 2020-2023 Nokia
4  */
5 
12 #ifndef ODP_API_SPEC_TIME_H_
13 #define ODP_API_SPEC_TIME_H_
14 #include <odp/visibility_begin.h>
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 #include <odp/api/std_types.h>
21 #include <odp/api/time_types.h>
22 
44 
52 uint64_t odp_time_local_ns(void);
53 
64 
72 uint64_t odp_time_local_strict_ns(void);
73 
88 
96 uint64_t odp_time_global_ns(void);
97 
107 
116 
126 
136 
149 
163 
171 uint64_t odp_time_to_ns(odp_time_t time);
172 
181 
190 
202 
208 uint64_t odp_time_local_res(void);
209 
215 uint64_t odp_time_global_res(void);
216 
225 
233 void odp_time_wait_ns(uint64_t ns);
234 
244 
249 #ifdef __cplusplus
250 }
251 #endif
252 
253 #include <odp/visibility_end.h>
254 #endif
Standard C language types and definitions for ODP.
ODP time.
uint64_t odp_time_to_ns(odp_time_t time)
Convert time to nanoseconds.
odp_time_t odp_time_diff(odp_time_t t2, odp_time_t t1)
Time difference.
odp_time_t odp_time_sum(odp_time_t t1, odp_time_t t2)
Time sum.
uint64_t odp_time_local_strict_ns(void)
Current local time in nanoseconds (strict)
void odp_time_wait_until(odp_time_t time)
Wait until the specified (wall clock) time has been reached.
odp_time_t odp_time_local_from_ns(uint64_t ns)
Convert nanoseconds to local time.
void odp_time_wait_ns(uint64_t ns)
Wait the specified number of nanoseconds.
odp_time_t odp_time_global(void)
Current global time.
odp_time_t odp_time_local(void)
Current local time.
uint64_t odp_time_global_strict_ns(void)
Current global time in nanoseconds (strict)
uint64_t odp_time_local_res(void)
Local time resolution in hertz.
odp_time_t odp_time_global_strict(void)
Current global time (strict)
odp_time_t odp_time_add_ns(odp_time_t time, uint64_t ns)
Add nanoseconds into time.
uint64_t odp_time_global_ns(void)
Current global time in nanoseconds.
odp_time_t odp_time_local_strict(void)
Current local time (strict)
int odp_time_cmp(odp_time_t t2, odp_time_t t1)
Compare two times.
odp_time_t odp_time_global_from_ns(uint64_t ns)
Convert nanoseconds to global time.
uint64_t odp_time_local_ns(void)
Current local time in nanoseconds.
uint64_t odp_time_diff_ns(odp_time_t t2, odp_time_t t1)
Time difference in nanoseconds.
uint64_t odp_time_global_res(void)
Global time resolution in hertz.
void odp_time_startup(odp_time_startup_t *startup)
Get ODP instance startup time.
Time stamp values at ODP startup.