summaryrefslogtreecommitdiffstats
path: root/sys/compat
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2018-03-13 16:09:04 +0000
committerhselasky <hselasky@FreeBSD.org>2018-03-13 16:09:04 +0000
commitb32095db8e6c721d7a424b4b554d82c49b53c418 (patch)
tree9e18491cb26ef7c9f0ddd52b3c61ae334d99140a /sys/compat
parent5726e7e88b6fe88b14490aa0f722dbcd89ac47b8 (diff)
downloadFreeBSD-src-b32095db8e6c721d7a424b4b554d82c49b53c418.zip
FreeBSD-src-b32095db8e6c721d7a424b4b554d82c49b53c418.tar.gz
MFC r330273:
Implement ktime_get_raw() function in the LinuxKPI. Submitted by: Johannes Lundberg <johalun0@gmail.com> Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/linuxkpi/common/include/linux/ktime.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/ktime.h b/sys/compat/linuxkpi/common/include/linux/ktime.h
index 1c6df95..b28cfe5 100644
--- a/sys/compat/linuxkpi/common/include/linux/ktime.h
+++ b/sys/compat/linuxkpi/common/include/linux/ktime.h
@@ -189,6 +189,15 @@ ktime_get_real_seconds(void)
return (ts.tv_sec);
}
+static inline ktime_t
+ktime_get_raw(void)
+{
+ struct timespec ts;
+
+ nanotime(&ts);
+ return (timespec_to_ktime(ts));
+}
+
static inline u64
ktime_get_raw_ns(void)
{
OpenPOWER on IntegriCloud