Merge branch 'directory-operation' of https://github.com/friendy-su/fio
[fio.git] / fio_time.h
index 8b4bb255f0b483dc4f1ad6f23759ddddaf439a7c..969ad68d5b9cdd0116a79c53d157c4366e7011ad 100644 (file)
@@ -1,8 +1,11 @@
 #ifndef FIO_TIME_H
 #define FIO_TIME_H
 
+#include <stdint.h>
+/* IWYU pragma: begin_exports */
 #include <time.h>
 #include <sys/time.h>
+/* IWYU pragma: end_exports */
 #include "lib/types.h"
 
 struct thread_data;
@@ -10,6 +13,8 @@ extern uint64_t ntime_since(const struct timespec *, const struct timespec *);
 extern uint64_t ntime_since_now(const struct timespec *);
 extern uint64_t utime_since(const struct timespec *, const struct timespec *);
 extern uint64_t utime_since_now(const struct timespec *);
+extern int64_t rel_time_since(const struct timespec *,
+                             const struct timespec *);
 extern uint64_t mtime_since(const struct timespec *, const struct timespec *);
 extern uint64_t mtime_since_now(const struct timespec *);
 extern uint64_t mtime_since_tv(const struct timeval *, const struct timeval *);
@@ -17,6 +22,7 @@ extern uint64_t time_since_now(const struct timespec *);
 extern uint64_t time_since_genesis(void);
 extern uint64_t mtime_since_genesis(void);
 extern uint64_t utime_since_genesis(void);
+extern void cycles_spin(unsigned int);
 extern uint64_t usec_spin(unsigned int);
 extern uint64_t usec_sleep(struct thread_data *, unsigned long);
 extern void fill_start_time(struct timespec *);
@@ -25,6 +31,6 @@ extern bool ramp_time_over(struct thread_data *);
 extern bool in_ramp_time(struct thread_data *);
 extern void fio_time_init(void);
 extern void timespec_add_msec(struct timespec *, unsigned int);
-extern void set_epoch_time(struct thread_data *, int);
+extern void set_epoch_time(struct thread_data *, clockid_t, clockid_t);
 
 #endif