From 1c794c63a0ba810147ddc8a0841b4de673639876 Mon Sep 17 00:00:00 2001 From: Pawel Wieczorkiewicz Date: Fri, 6 Aug 2021 10:55:20 +0200 Subject: [PATCH] time: add get_timer_ticks() functions This function returns current value of ticks variable. Signed-off-by: Pawel Wieczorkiewicz --- include/time.h | 1 + lib/time.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/include/time.h b/include/time.h index b4357e5b..63cc21c6 100644 --- a/include/time.h +++ b/include/time.h @@ -28,6 +28,7 @@ typedef uint64_t time_t; extern void sleep(time_t ms); +extern time_t get_timer_ticks(void); /* Static declarations */ diff --git a/lib/time.c b/lib/time.c index 646bc57c..c2af0c47 100644 --- a/lib/time.c +++ b/lib/time.c @@ -38,3 +38,5 @@ void sleep(time_t ms) { cpu_relax(); } } + +time_t get_timer_ticks(void) { return ticks; }