diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/cortex-m/timer.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/cortex-m/timer.c b/core/cortex-m/timer.c index ba45bc8783..0078936f5a 100644 --- a/core/cortex-m/timer.c +++ b/core/cortex-m/timer.c @@ -37,6 +37,12 @@ static void expire_timer(task_id_t tskid) task_set_event(tskid, TASK_EVENT_TIMER, 0); } +int timestamp_expired(timestamp_t deadline) +{ + timestamp_t now = get_time(); + + return ((int64_t)(now.val - deadline.val) >= 0); +} void process_timers(int overflow) { |