git: aafe4126f794 - main - LinuxKPI: Add ms_to_ktime
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 08 Apr 2024 06:49:06 UTC
The branch main has been updated by wulf:
URL: https://cgit.FreeBSD.org/src/commit/?id=aafe4126f7942daef5b7d522bd4fafc5deddb0bf
commit aafe4126f7942daef5b7d522bd4fafc5deddb0bf
Author: Vladimir Kondratyev <wulf@FreeBSD.org>
AuthorDate: 2024-04-08 06:47:42 +0000
Commit: Vladimir Kondratyev <wulf@FreeBSD.org>
CommitDate: 2024-04-08 06:47:42 +0000
LinuxKPI: Add ms_to_ktime
Sponsored by: Serenity CyberSecurity, LLC
Reviewed by: emaste
MFC after: 1 week
---
sys/compat/linuxkpi/common/include/linux/ktime.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/sys/compat/linuxkpi/common/include/linux/ktime.h b/sys/compat/linuxkpi/common/include/linux/ktime.h
index b13c7182bc61..53c2abd64fc6 100644
--- a/sys/compat/linuxkpi/common/include/linux/ktime.h
+++ b/sys/compat/linuxkpi/common/include/linux/ktime.h
@@ -69,6 +69,12 @@ ktime_to_ms(ktime_t kt)
return (ktime_divns(kt, NSEC_PER_MSEC));
}
+static inline ktime_t
+ms_to_ktime(uint64_t ms)
+{
+ return (ms * NSEC_PER_MSEC);
+}
+
static inline struct timeval
ktime_to_timeval(ktime_t kt)
{