Commit d1fd9729 authored by David Howells's avatar David Howells Committed by Jakub Kicinski
Browse files

ktime: Add us_to_ktime()



Add a us_to_ktime() helper to go with ms_to_ktime() and ns_to_ktime().

Signed-off-by: default avatarDavid 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: default avatarJakub Kicinski <kuba@kernel.org>
parent 6145fefc
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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;