projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PATCH] Make sure the fio_options[] members are always zero filled
[fio.git]
/
eta.c
diff --git
a/eta.c
b/eta.c
index 99e59ec51d78d4bac7ff45180f16f3ce9407a7d2..5ea429404945bb63a6f63989b4df6bf50757af60 100644
(file)
--- a/
eta.c
+++ b/
eta.c
@@
-84,15
+84,15
@@
static void eta_to_str(char *str, int eta_sec)
if (d || always_d) {
always_d = 1;
if (d || always_d) {
always_d = 1;
- str += sprintf(str, "%02
d
d:", d);
+ str += sprintf(str, "%02
u
d:", d);
}
if (h || always_h) {
always_h = 1;
}
if (h || always_h) {
always_h = 1;
- str += sprintf(str, "%02
d
h:", h);
+ str += sprintf(str, "%02
u
h:", h);
}
}
- str += sprintf(str, "%02
d
m:", m);
- str += sprintf(str, "%02
d
s", s);
+ str += sprintf(str, "%02
u
m:", m);
+ str += sprintf(str, "%02
u
s", s);
}
/*
}
/*
@@
-101,7
+101,7
@@
static void eta_to_str(char *str, int eta_sec)
static int thread_eta(struct thread_data *td, unsigned long elapsed)
{
unsigned long long bytes_total, bytes_done;
static int thread_eta(struct thread_data *td, unsigned long elapsed)
{
unsigned long long bytes_total, bytes_done;
- unsigned
int
eta_sec = 0;
+ unsigned
long
eta_sec = 0;
bytes_total = td->total_io_size;
bytes_total = td->total_io_size;
@@
-127,7
+127,7
@@
static int thread_eta(struct thread_data *td, unsigned long elapsed)
if (perc > 1.0)
perc = 1.0;
if (perc > 1.0)
perc = 1.0;
- eta_sec = (elapsed * (1.0 / perc)) - elapsed;
+ eta_sec = (
unsigned long) (
elapsed * (1.0 / perc)) - elapsed;
if (td->timeout && eta_sec > (td->timeout - elapsed))
eta_sec = td->timeout - elapsed;
if (td->timeout && eta_sec > (td->timeout - elapsed))
eta_sec = td->timeout - elapsed;