Commit | Line | Data |
---|---|---|
c223da83 JA |
1 | #ifndef FIO_TIME_H |
2 | #define FIO_TIME_H | |
3 | ||
3d2d14bc | 4 | #include <stdint.h> |
c473a9bd | 5 | /* IWYU pragma: begin_exports */ |
6fe147de | 6 | #include <time.h> |
c36173ea | 7 | #include <sys/time.h> |
c473a9bd | 8 | /* IWYU pragma: end_exports */ |
356014ff JA |
9 | #include "lib/types.h" |
10 | ||
48b944c4 | 11 | struct thread_data; |
d6bb626e | 12 | extern uint64_t ntime_since(const struct timespec *, const struct timespec *); |
0410e783 | 13 | extern uint64_t ntime_since_now(const struct timespec *); |
d6bb626e | 14 | extern uint64_t utime_since(const struct timespec *, const struct timespec *); |
8b6a404c | 15 | extern uint64_t utime_since_now(const struct timespec *); |
383c7960 BVA |
16 | extern int64_t rel_time_since(const struct timespec *, |
17 | const struct timespec *); | |
8b6a404c VF |
18 | extern uint64_t mtime_since(const struct timespec *, const struct timespec *); |
19 | extern uint64_t mtime_since_now(const struct timespec *); | |
20 | extern uint64_t mtime_since_tv(const struct timeval *, const struct timeval *); | |
21 | extern uint64_t time_since_now(const struct timespec *); | |
8b22c785 | 22 | extern uint64_t time_since_genesis(void); |
aa60bc58 | 23 | extern uint64_t mtime_since_genesis(void); |
0de5b26f | 24 | extern uint64_t utime_since_genesis(void); |
9cc80b6d JA |
25 | extern uint64_t usec_spin(unsigned int); |
26 | extern uint64_t usec_sleep(struct thread_data *, unsigned long); | |
8b6a404c | 27 | extern void fill_start_time(struct timespec *); |
c223da83 | 28 | extern void set_genesis_time(void); |
356014ff JA |
29 | extern bool ramp_time_over(struct thread_data *); |
30 | extern bool in_ramp_time(struct thread_data *); | |
c223da83 | 31 | extern void fio_time_init(void); |
8b6a404c | 32 | extern void timespec_add_msec(struct timespec *, unsigned int); |
3aea75b1 | 33 | extern void set_epoch_time(struct thread_data *, int); |
c223da83 JA |
34 | |
35 | #endif |