mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-15 21:23:23 +00:00
ktime: Add us_to_ktime()
Add a us_to_ktime() helper to go with ms_to_ktime() and ns_to_ktime(). Signed-off-by: David Howells <dhowells@redhat.com> cc: Thomas Gleixner <tglx@linutronix.de> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20241204074710.990092-2-dhowells@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
6145fefc1e
commit
d1fd972914
@ -222,6 +222,11 @@ static inline ktime_t ns_to_ktime(u64 ns)
|
||||
return ns;
|
||||
}
|
||||
|
||||
static inline ktime_t us_to_ktime(u64 us)
|
||||
{
|
||||
return us * NSEC_PER_USEC;
|
||||
}
|
||||
|
||||
static inline ktime_t ms_to_ktime(u64 ms)
|
||||
{
|
||||
return ms * NSEC_PER_MSEC;
|
||||
|
Loading…
x
Reference in New Issue
Block a user