Skip to contentSkip to conversation

backports: add ktime_get_boot_ns()

PATCH Superseded Johannes Berg 1 participant 1 message Dec 7, 2015

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 backports: add ktime_get_boot_ns()

From: Johannes Berg <[email protected]>

This small helper inline was added in 3.17, we want to use it now so need to backport it.

---
 backport/backport-include/linux/timekeeping.h | 6 ++++++
 1 file changed, 6 insertions(+)
backport/backport-include/linux/timekeeping.h +6 -0
index fe42e7170680..db90a0a139b5 100644
@@ -15,6 +15,12 @@ static inline u64 ktime_get_ns(void)
 {
 	return ktime_to_ns(ktime_get());
 }
+
+extern ktime_t ktime_get_boottime(void);
+static inline u64 ktime_get_boot_ns(void)
+{
+	return ktime_to_ns(ktime_get_boottime());
+}
 #endif
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)
Signature · 4 lines
2.6.2

--
To unsubscribe from this list: send the line "unsubscribe backports" in