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