Skip to content

Commit

Permalink
time: add get_timer_ticks() functions
Browse files Browse the repository at this point in the history
This function returns current value of ticks variable.

Signed-off-by: Pawel Wieczorkiewicz <[email protected]>
  • Loading branch information
wipawel committed Aug 6, 2021
1 parent 46f250e commit 1c794c6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/time.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
typedef uint64_t time_t;

extern void sleep(time_t ms);
extern time_t get_timer_ticks(void);

/* Static declarations */

Expand Down
2 changes: 2 additions & 0 deletions lib/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ void sleep(time_t ms) {
cpu_relax();
}
}

time_t get_timer_ticks(void) { return ticks; }

0 comments on commit 1c794c6

Please sign in to comment.