Whamcloud - gitweb
LU-4423 lnet: Better cookie gen
[fs/lustre-release.git] / libcfs / include / libcfs / linux / linux-time.h
index e65d2f7..bf403ff 100644 (file)
@@ -145,6 +145,13 @@ time64_t ktime_get_real_seconds(void);
 time64_t ktime_get_seconds(void);
 #endif /* HAVE_KTIME_GET_SECONDS */
 
+#ifndef HAVE_KTIME_GET_REAL_NS
+static inline u64 ktime_get_real_ns(void)
+{
+       return ktime_to_ns(ktime_get_real());
+}
+#endif /* HAVE_KTIME_GET_NS */
+
 static inline int cfs_time_before(cfs_time_t t1, cfs_time_t t2)
 {
         return time_before(t1, t2);