X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=fio_time.h;h=ee8087e0cff24bd0426720e8c62feb354baecf45;hb=f54ed5226828e8837b57902369bd61b1c4c3238a;hp=c550a55b72a6e3d32153fa2e75815c9f1892418a;hpb=25f488581e510c1b440f2e76842ec23f3dad7b57;p=fio.git diff --git a/fio_time.h b/fio_time.h index c550a55b..ee8087e0 100644 --- a/fio_time.h +++ b/fio_time.h @@ -1,19 +1,29 @@ #ifndef FIO_TIME_H #define FIO_TIME_H -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 *); +#include +#include "lib/types.h" + +struct thread_data; +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 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 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 *, int); #endif