blob: 6e592d7a8bbc04d9746477a68b144b805117baff (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright (c) 2013-2018 Linaro Limited
* Copyright (c) 2020-2023 Nokia
*/
#ifndef ODP_ARCH_TIME_INLINES_H_
#define ODP_ARCH_TIME_INLINES_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <odp/api/time_types.h>
#include <stdint.h>
odp_time_t _odp_time_cur(void);
uint64_t _odp_time_res(void);
void _odp_time_startup(odp_time_startup_t *startup);
static inline odp_time_t _odp_time_cur_strict(void)
{
return _odp_time_cur();
}
static inline uint64_t _odp_time_to_ns(odp_time_t time)
{
return time.nsec;
}
static inline odp_time_t _odp_time_from_ns(uint64_t ns)
{
odp_time_t time;
time.nsec = ns;
return time;
}
#ifdef __cplusplus
}
#endif
#endif
|