summaryrefslogtreecommitdiff
path: root/lib/timer.h
diff options
context:
space:
mode:
authorToke Høiland-Jørgensen <toke@toke.dk>2023-06-02 00:26:41 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2023-06-02 00:26:41 +0200
commitd8cf3cad5104ab7a9887397b2a34d94c8a5f2aef (patch)
tree5e2d4be853f84197031092febf20a66a7a7acdf7 /lib/timer.h
parentf8ba82804faba5cc1520d4545330502e29b9e920 (diff)
IO: Add current_time_now() function for immediate timestamp
Add a current_time_now() function which gets an immediate monotonic timestamp instead of using the cached value from the event loop. This is useful for callers that need precise times, such as the Babel RTT measurement code. Minor changes by committer.
Diffstat (limited to 'lib/timer.h')
-rw-r--r--lib/timer.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/timer.h b/lib/timer.h
index c5ea430c..0f87852b 100644
--- a/lib/timer.h
+++ b/lib/timer.h
@@ -46,6 +46,9 @@ extern struct timeloop main_timeloop;
btime current_time(void);
btime current_real_time(void);
+/* In sysdep code */
+btime current_time_now(void);
+
//#define now (current_time() TO_S)
//#define now_real (current_real_time() TO_S)
extern btime boot_time;