[go: up one dir, main page]

File: fio_time.h

package info (click to toggle)
fio 3.39-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 12,924 kB
  • sloc: ansic: 80,931; python: 9,252; sh: 5,843; makefile: 813; yacc: 204; lex: 184
file content (36 lines) | stat: -rw-r--r-- 1,477 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef FIO_TIME_H
#define FIO_TIME_H

#include <stdint.h>
/* IWYU pragma: begin_exports */
#include <time.h>
#include <sys/time.h>
/* IWYU pragma: end_exports */
#include "lib/types.h"

struct thread_data;
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 int64_t rel_time_since(const struct timespec *,
			      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 void cycles_spin(unsigned int);
extern uint64_t usec_spin(unsigned int);
extern uint64_t usec_sleep(struct thread_data *, unsigned long);
extern void fill_start_time(struct timespec *);
extern void set_genesis_time(void);
extern bool ramp_time_over(struct thread_data *);
extern bool in_ramp_time(struct thread_data *);
extern void fio_time_init(void);
extern void timespec_add_msec(struct timespec *, unsigned int);
extern void set_epoch_time(struct thread_data *, clockid_t, clockid_t);

#endif