aboutsummaryrefslogtreecommitdiff
path: root/doc/mach.texi
diff options
context:
space:
mode:
authorZhaoming Luo <zhmingluo@163.com>2024-12-24 09:57:51 +0800
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2024-12-29 02:22:29 +0100
commitfc494bfe3fb6363e1077dc035eb119970d84a9d1 (patch)
tree271db20499a280503ad5b046436fd9dd54dd5b25 /doc/mach.texi
parent0bd3b64ff3af9a7c1b65bafb5cbf5189c52dc85a (diff)
downloadgnumach-fc494bfe3fb6363e1077dc035eb119970d84a9d1.tar.gz
gnumach-fc494bfe3fb6363e1077dc035eb119970d84a9d1.tar.bz2
gnumach-fc494bfe3fb6363e1077dc035eb119970d84a9d1.zip
kern: Add a mach host operation which returns elapsed time since bootup
Add host_get_uptime64() mach interface operation. It can be used to get the time passed since the boot up. * doc/mach.texi: Add the documentation for the operation * include/mach/mach_host.defs: Add the interface * include/mach/time_value.h: Extend the mappable time variable * kern/mach_clock.c: Operation implementation * kern/mach_clock.h: Add a new variable for storing uptime Signed-off-by: Zhaoming Luo <zhmingluo@163.com> Message-ID: <20241224015751.1282-1-zhmingluo@163.com>
Diffstat (limited to 'doc/mach.texi')
-rw-r--r--doc/mach.texi5
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/mach.texi b/doc/mach.texi
index f85288e0..f54ed655 100644
--- a/doc/mach.texi
+++ b/doc/mach.texi
@@ -5664,6 +5664,11 @@ Get the current time as seen by @var{host}. On success, the time passed
since the epoch is returned in @var{current_time}.
@end deftypefun
+@deftypefun kern_return_t host_get_uptime64 (@w{host_t @var{host}}, @w{time_value64_t *@var{uptime}})
+Get the elapsed time since the boot up as seen by @var{host}. On success, the time passed
+since the boot up is returned in @var{uptime}.
+@end deftypefun
+
@deftypefun kern_return_t host_set_time64 (@w{host_priv_t @var{host_priv}}, @w{time_value64_t @var{new_time}})
Set the time of @var{host_priv} to @var{new_time}.
@end deftypefun