Whamcloud - gitweb
LU-6245 libcfs: remove libcfs userland time abstraction
[fs/lustre-release.git] / libcfs / include / libcfs / libcfs_time.h
index 6ac5659..0011bf3 100644 (file)
@@ -82,14 +82,6 @@ static inline long cfs_timeval_sub(struct timeval *large, struct timeval *small,
         return r;
 }
 
-static inline void cfs_slow_warning(cfs_time_t now, int seconds, char *msg)
-{
-        if (cfs_time_after(cfs_time_current(),
-                           cfs_time_add(now, cfs_time_seconds(15))))
-                CERROR("slow %s "CFS_TIME_T" sec\n", msg,
-                       cfs_duration_sec(cfs_time_sub(cfs_time_current(),now)));
-}
-
 #define CFS_RATELIMIT(seconds)                                  \
 ({                                                              \
         /*                                                      \
@@ -118,15 +110,17 @@ static inline void cfs_fs_timeval(struct timeval *tv)
         cfs_fs_time_usec(&time, tv);
 }
 
+#define CFS_TICK       1
+
 /*
  * return valid time-out based on user supplied one. Currently we only check
  * that time-out is not shorted than allowed.
  */
 static inline cfs_duration_t cfs_timeout_cap(cfs_duration_t timeout)
 {
-        if (timeout < CFS_TICK)
-                timeout = CFS_TICK;
-        return timeout;
+       if (timeout < CFS_TICK)
+               timeout = CFS_TICK;
+       return timeout;
 }
 
 #endif