Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Apr 2024 06:49:06 GMT
From:      Vladimir Kondratyev <wulf@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: aafe4126f794 - main - LinuxKPI: Add ms_to_ktime
Message-ID:  <202404080649.4386n6IX032575@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)
 {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202404080649.4386n6IX032575>