X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=fio_time.h;h=c00f8e7866d94fd47ae6e0b54f03453efdbd0844;hp=9f7d209a303f7987612923f456162fe5ce5d1d96;hb=refs%2Fheads%2Fmaster;hpb=48b944c48c196ebb5231c2e31d729822629ca1b7 diff --git a/fio_time.h b/fio_time.h index 9f7d209a..969ad68d 100644 --- a/fio_time.h +++ b/fio_time.h @@ -1,20 +1,36 @@ #ifndef FIO_TIME_H #define FIO_TIME_H +#include +/* IWYU pragma: begin_exports */ +#include +#include +/* IWYU pragma: end_exports */ +#include "lib/types.h" + struct thread_data; -extern uint64_t utime_since(struct timeval *, struct timeval *); -extern uint64_t utime_since_now(struct timeval *); -extern uint64_t mtime_since(struct timeval *, struct timeval *); -extern uint64_t mtime_since_now(struct timeval *); -extern uint64_t time_since_now(struct timeval *); +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 *); +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 usec_spin(unsigned int); -extern void usec_sleep(struct thread_data *, unsigned long); -extern void fill_start_time(struct timeval *); +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 *); extern void set_genesis_time(void); -extern int ramp_time_over(struct thread_data *); -extern int in_ramp_time(struct thread_data *); +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 *, clockid_t, clockid_t); #endif