1 /* 2 * Copyright (c) 2018 Oticon A/S 3 * Copyright (c) 2023 Nordic Semiconductor ASA 4 * 5 * SPDX-License-Identifier: Apache-2.0 6 */ 7 /** 8 * This interface is kept only for backwards compatibility with old applications/tests 9 * All these are deprecated. 10 */ 11 #ifndef _TIME_MACHINE_IF_H 12 #define _TIME_MACHINE_IF_H 13 14 #include "bs_types.h" 15 #include "nsi_hw_scheduler.h" 16 17 #ifdef __cplusplus 18 extern "C" { 19 #endif 20 tm_get_abs_time(void)21static inline bs_time_t tm_get_abs_time(void) 22 { 23 return nsi_hws_get_time(); 24 } 25 tm_get_hw_time(void)26static inline bs_time_t tm_get_hw_time(void) 27 { 28 return nsi_hws_get_time(); 29 } 30 tm_abs_time_to_hw_time(bs_time_t abstime)31static inline bs_time_t tm_abs_time_to_hw_time(bs_time_t abstime) 32 { 33 return abstime; 34 } 35 tm_hw_time_to_abs_time(bs_time_t hwtime)36static inline bs_time_t tm_hw_time_to_abs_time(bs_time_t hwtime) 37 { 38 return hwtime; 39 } 40 tm_find_next_timer_to_trigger(void)41static inline void tm_find_next_timer_to_trigger(void) 42 { 43 nsi_hws_find_next_event(); 44 } 45 tm_get_next_timer_abstime(void)46static inline bs_time_t tm_get_next_timer_abstime(void) 47 { 48 return nsi_hws_get_next_event_time(); 49 } 50 51 void tm_set_phy_max_resync_offset(bs_time_t offset_in_us); 52 53 #ifdef __cplusplus 54 } 55 #endif 56 57 #endif 58