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