Whamcloud - gitweb
LU-9118 o2iblnd: handle MOFED libcfs time api collision
[fs/lustre-release.git] / libcfs / include / libcfs / linux / linux-time.h
index 706b79c..6c1004d 100644 (file)
@@ -97,7 +97,6 @@
 
 typedef unsigned long cfs_time_t;      /* jiffies */
 typedef long cfs_duration_t;
-typedef cycles_t cfs_cycles_t;
 
 #ifndef HAVE_TIMESPEC64
 
@@ -146,6 +145,13 @@ time64_t ktime_get_real_seconds(void);
 time64_t ktime_get_seconds(void);
 #endif /* HAVE_KTIME_GET_SECONDS */
 
+#ifdef NEED_KTIME_GET_REAL_NS
+static inline u64 ktime_get_real_ns(void)
+{
+       return ktime_to_ns(ktime_get_real());
+}
+#endif /* NEED_KTIME_GET_REAL_NS */
+
 static inline int cfs_time_before(cfs_time_t t1, cfs_time_t t2)
 {
         return time_before(t1, t2);