aboutsummaryrefslogtreecommitdiff
path: root/sys/include
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-05-26 23:35:16 -0400
committerIan Moffett <ian@osmora.org>2024-05-26 23:35:16 -0400
commit97ccc71cfd0b15b8cc7b54405c1231e0e63c7f9c (patch)
treee10d21243980f9ebb7bcfd0a94853055f77271d8 /sys/include
parent44b65521e0e87f7979d2ed0cbf602be627737eb9 (diff)
kernel/amd64: Support fetching time since startup
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/include')
-rw-r--r--sys/include/sys/timer.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/include/sys/timer.h b/sys/include/sys/timer.h
index a255bab..e33b2d3 100644
--- a/sys/include/sys/timer.h
+++ b/sys/include/sys/timer.h
@@ -72,6 +72,8 @@ typedef int tmrr_status_t;
struct timer {
const char *name; /* e.g "HPET" */
size_t(*calibrate)(void); /* Returns frequency, 0 for unspecified */
+ size_t(*get_time_usec)(void); /* Time since init (microseconds) */
+ size_t(*get_time_sec)(void); /* Time since init (seconds) */
int(*msleep)(size_t ms);
int(*usleep)(size_t us);
int(*nsleep)(size_t ns);