projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Strip blank end/front of filenames
[fio.git]
/
gettime.c
diff --git
a/gettime.c
b/gettime.c
index 161240eeedbbcee0107bfc92a5c1fa7e94954915..4f6ec955c561cf49b9bfae3740f1c4968d51a0ff 100644
(file)
--- a/
gettime.c
+++ b/
gettime.c
@@
-10,7
+10,7
@@
#include "hash.h"
#include "hash.h"
-static int clock_gettime_works =
1
;
+static int clock_gettime_works =
0
;
#ifdef FIO_DEBUG_TIME
#ifdef FIO_DEBUG_TIME
@@
-113,26
+113,18
@@
void fio_gettime(struct timeval *tp, void fio_unused *caller)
gtod_log_caller(caller);
#endif
gtod_log_caller(caller);
#endif
-repeat:
- if (!clock_gettime_works)
+ if (!clock_gettime_works) {
+gtod:
gettimeofday(tp, NULL);
gettimeofday(tp, NULL);
- else {
+
}
else {
struct timespec ts;
if (clock_gettime(CLOCK_MONOTONIC, &ts) < 0) {
clock_gettime_works = 0;
struct timespec ts;
if (clock_gettime(CLOCK_MONOTONIC, &ts) < 0) {
clock_gettime_works = 0;
- goto
repeat
;
+ goto
gtod
;
}
tp->tv_sec = ts.tv_sec;
tp->tv_usec = ts.tv_nsec / 1000;
}
}
}
tp->tv_sec = ts.tv_sec;
tp->tv_usec = ts.tv_nsec / 1000;
}
}
-
-static void fio_init check_clock(void)
-{
- struct timespec ts;
-
- if (clock_getres(CLOCK_MONOTONIC, &ts) < 0)
- clock_gettime_works = 0;
-}