diff --git a/libraries/mbed/common/us_ticker_api.c b/libraries/mbed/common/us_ticker_api.c index 9d9c6562be..f98b56a9e8 100644 --- a/libraries/mbed/common/us_ticker_api.c +++ b/libraries/mbed/common/us_ticker_api.c @@ -116,3 +116,7 @@ void us_ticker_remove_event(ticker_event_t *obj) { __enable_irq(); } + +timestamp_t us_ticker_get_next_timestamp(void) { + return head->timestamp; +} diff --git a/libraries/mbed/hal/us_ticker_api.h b/libraries/mbed/hal/us_ticker_api.h index b7df3b57a1..543c4da934 100644 --- a/libraries/mbed/hal/us_ticker_api.h +++ b/libraries/mbed/hal/us_ticker_api.h @@ -43,6 +43,7 @@ void us_ticker_irq_handler(void); void us_ticker_insert_event(ticker_event_t *obj, timestamp_t timestamp, uint32_t id); void us_ticker_remove_event(ticker_event_t *obj); +timestamp_t us_ticker_get_next_timestamp(void); #ifdef __cplusplus }