Refactor #includes and headers
[fio.git] / fio_time.h
1 #ifndef FIO_TIME_H
2 #define FIO_TIME_H
3
4 #include <stdint.h>
5 #include <time.h>
6 #include <sys/time.h>
7 #include "lib/types.h"
8
9 struct thread_data;
10 extern uint64_t ntime_since(const struct timespec *, const struct timespec *);
11 extern uint64_t ntime_since_now(const struct timespec *);
12 extern uint64_t utime_since(const struct timespec *, const struct timespec *);
13 extern uint64_t utime_since_now(const struct timespec *);
14 extern uint64_t mtime_since(const struct timespec *, const struct timespec *);
15 extern uint64_t mtime_since_now(const struct timespec *);
16 extern uint64_t mtime_since_tv(const struct timeval *, const struct timeval *);
17 extern uint64_t time_since_now(const struct timespec *);
18 extern uint64_t time_since_genesis(void);
19 extern uint64_t mtime_since_genesis(void);
20 extern uint64_t utime_since_genesis(void);
21 extern uint64_t usec_spin(unsigned int);
22 extern uint64_t usec_sleep(struct thread_data *, unsigned long);
23 extern void fill_start_time(struct timespec *);
24 extern void set_genesis_time(void);
25 extern bool ramp_time_over(struct thread_data *);
26 extern bool in_ramp_time(struct thread_data *);
27 extern void fio_time_init(void);
28 extern void timespec_add_msec(struct timespec *, unsigned int);
29 extern void set_epoch_time(struct thread_data *, int);
30
31 #endif