git: 9c67525fc362 - stable/14 - LinuxKPI: Add ms_to_ktime
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 01 Aug 2024 22:27:17 UTC
The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=9c67525fc36260e5ada6902a96c81bb36805e395 commit 9c67525fc36260e5ada6902a96c81bb36805e395 Author: Vladimir Kondratyev <wulf@FreeBSD.org> AuthorDate: 2024-04-08 06:47:42 +0000 Commit: Vladimir Kondratyev <wulf@FreeBSD.org> CommitDate: 2024-08-01 21:09:37 +0000 LinuxKPI: Add ms_to_ktime Sponsored by: Serenity CyberSecurity, LLC Reviewed by: emaste MFC after: 1 week (cherry picked from commit aafe4126f7942daef5b7d522bd4fafc5deddb0bf) --- 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) {