X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=fio_time.h;h=39fb17ba245caee553ccec82924685fee3fc9dda;hp=cb271c26883adc5aebcec42d0fab9673aeec265d;hb=5d413e0897fee7c2bf10d9ecc0860d3b399d66d5;hpb=a47591e4923fb8faef18e1cd5125a50429282089 diff --git a/fio_time.h b/fio_time.h index cb271c26..39fb17ba 100644 --- a/fio_time.h +++ b/fio_time.h @@ -1,22 +1,31 @@ #ifndef FIO_TIME_H #define FIO_TIME_H +#include +#include +#include +#include "lib/types.h" + struct thread_data; -extern uint64_t utime_since(const struct timeval *,const struct timeval *); -extern uint64_t utime_since_now(const struct timeval *); -extern uint64_t mtime_since(const struct timeval *, const struct timeval *); -extern uint64_t mtime_since_now(const struct timeval *); -extern uint64_t time_since_now(const 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 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 uint64_t usec_spin(unsigned int); extern uint64_t usec_sleep(struct thread_data *, unsigned long); -extern void fill_start_time(struct timeval *); +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 timeval_add_msec(struct timeval *, unsigned int); +extern void timespec_add_msec(struct timespec *, unsigned int); +extern void set_epoch_time(struct thread_data *, int); #endif