projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add the zonemode job option
[fio.git]
/
gettime.h
diff --git
a/gettime.h
b/gettime.h
index b775ef3a42d1964b998c51cb9f2348213bec67e9..f92ee8c430c8d9cdb48f31effabd885af07c9257 100644
(file)
--- a/
gettime.h
+++ b/
gettime.h
@@
-1,6
+1,8
@@
#ifndef FIO_GETTIME_H
#define FIO_GETTIME_H
#ifndef FIO_GETTIME_H
#define FIO_GETTIME_H
+#include <sys/time.h>
+
#include "arch/arch.h"
/*
#include "arch/arch.h"
/*
@@
-13,27
+15,27
@@
enum fio_cs {
CS_INVAL,
};
CS_INVAL,
};
-extern void fio_gettime(struct time
val
*, void *);
+extern void fio_gettime(struct time
spec
*, void *);
extern void fio_gtod_init(void);
extern void fio_clock_init(void);
extern int fio_start_gtod_thread(void);
extern void fio_gtod_init(void);
extern void fio_clock_init(void);
extern int fio_start_gtod_thread(void);
-extern int fio_monotonic_clocktest(
void
);
-extern void fio_local_clock_init(
int
);
+extern int fio_monotonic_clocktest(
int debug
);
+extern void fio_local_clock_init(
void
);
-extern struct time
val *fio_tv
;
+extern struct time
spec *fio_ts
;
-static inline int fio_gettime_offload(struct time
val *tv
)
+static inline int fio_gettime_offload(struct time
spec *ts
)
{
{
-
siz
e_t last_sec;
+
tim
e_t last_sec;
- if (!fio_t
v
)
+ if (!fio_t
s
)
return 0;
do {
read_barrier();
return 0;
do {
read_barrier();
- last_sec = t
v->tv_sec = fio_tv
->tv_sec;
- t
v->tv_usec = fio_tv->tv_u
sec;
- } while (fio_t
v
->tv_sec != last_sec);
+ last_sec = t
s->tv_sec = fio_ts
->tv_sec;
+ t
s->tv_nsec = fio_ts->tv_n
sec;
+ } while (fio_t
s
->tv_sec != last_sec);
return 1;
}
return 1;
}