projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
example: add SSD steady state test case
[fio.git]
/
time.c
diff --git
a/time.c
b/time.c
index 5755b67e78e7c71e0b33f426ea807ec19bb6f9d0..4af84bc7cc5b6a2e1f0be57f284e3e6c3d57f2c8 100644
(file)
--- a/
time.c
+++ b/
time.c
@@
-5,7
+5,6
@@
static struct timeval genesis;
static unsigned long ns_granularity;
static struct timeval genesis;
static unsigned long ns_granularity;
-unsigned long long genesis_cycles;
unsigned long long utime_since(struct timeval *s, struct timeval *e)
{
unsigned long long utime_since(struct timeval *s, struct timeval *e)
{
@@
-49,16
+48,13
@@
unsigned long mtime_since(struct timeval *s, struct timeval *e)
usec += 1000000;
}
usec += 1000000;
}
+ if (sec < 0 || (sec == 0 && usec < 0))
+ return 0;
+
sec *= 1000UL;
usec /= 1000UL;
ret = sec + usec;
sec *= 1000UL;
usec /= 1000UL;
ret = sec + usec;
- /*
- * time warp bug on some kernels?
- */
- if (ret < 0)
- ret = 0;
-
return ret;
}
return ret;
}
@@
-151,7
+147,7
@@
int ramp_time_over(struct thread_data *td)
return 0;
}
return 0;
}
-void fio_
init fio_
time_init(void)
+void fio_time_init(void)
{
int i;
{
int i;
@@
-180,7
+176,6
@@
void fio_init fio_time_init(void)
void set_genesis_time(void)
{
fio_gettime(&genesis, NULL);
void set_genesis_time(void)
{
fio_gettime(&genesis, NULL);
- genesis_cycles = get_cpu_clock();
}
void fill_start_time(struct timeval *t)
}
void fill_start_time(struct timeval *t)