From 18d303b05f28acf005dad3f2ffbbec4895181dde Mon Sep 17 00:00:00 2001 From: "Bjoern A. Zeeb" Date: Mon, 24 May 2021 18:30:33 +0000 Subject: [PATCH] LinuxKPI: add ktime_get_boottime_ns() implementation to ktime.h Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D30432 --- sys/compat/linuxkpi/common/include/linux/ktime.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/ktime.h b/sys/compat/linuxkpi/common/include/linux/ktime.h index e480de3181a9..1475674a12e6 100644 --- a/sys/compat/linuxkpi/common/include/linux/ktime.h +++ b/sys/compat/linuxkpi/common/include/linux/ktime.h @@ -220,6 +220,13 @@ ktime_get_boottime(void) return (timespec_to_ktime(ts)); } +static inline uint64_t +ktime_get_boottime_ns(void) +{ + + return (ktime_to_ns(ktime_get_boottime())); +} + static inline ktime_t ktime_get_real(void) {