* int cfs_fs_time_before (cfs_fs_time_t *, cfs_fs_time_t *);
* int cfs_fs_time_beforeq(cfs_fs_time_t *, cfs_fs_time_t *);
*
- * cfs_duration_t cfs_time_minimal_timeout(void)
- *
* CFS_TIME_FORMAT
* CFS_DURATION_FORMAT
*
*/
-#define ONE_BILLION ((u_int64_t)1000000000)
-#define ONE_MILLION ((u_int64_t) 1000000)
-
#ifndef __KERNEL__
+#define ONE_BILLION ((u_int64_t)1000000000)
+#define ONE_MILLION 1000000
+
/*
* Liblustre. time(2) based implementation.
*/
return seconds;
}
+static inline time_t cfs_time_current_sec(void)
+{
+ return cfs_time_seconds(cfs_time_current());
+}
+
static inline int cfs_time_before(cfs_time_t t1, cfs_time_t t2)
{
return t1 < t2;
static inline cfs_duration_t cfs_duration_build(int64_t nano)
{
- return nano / ONE_BILLION;
+ return (cfs_duration_t) (nano / ONE_BILLION);
}
static inline time_t cfs_duration_sec(cfs_duration_t d)
return *t1 <= *t2;
}
-static inline cfs_duration_t cfs_time_minimal_timeout(void)
-{
- return 1;
-}
-
-#define CFS_MIN_DELAY (1)
+#define CFS_TICK (1)
static inline cfs_time_t cfs_time_add(cfs_time_t t, cfs_duration_t d)
{
return t1 - t2;
}
+#define cfs_time_current_64 cfs_time_current
+#define cfs_time_add_64 cfs_time_add
+#define cfs_time_shift_64 cfs_time_shift
+#define cfs_time_before_64 cfs_time_before
+
#define CFS_TIME_T "%lu"
#define CFS_DURATION_T "%ld"