fio: flush log files on test end
[fio.git] / backend.c
index 32bc2652bd0ba93793c9b12cc27ca8b4cf81aef0..87aec87b37ac6df9b975f274f6200f344bae5dd4 100644 (file)
--- a/backend.c
+++ b/backend.c
@@ -346,7 +346,7 @@ static inline int runtime_exceeded(struct thread_data *td, struct timeval *t)
                return 0;
        if (!td->o.timeout)
                return 0;
-       if (mtime_since(&td->epoch, t) >= td->o.timeout * 1000)
+       if (mtime_since(&td->epoch, t) >= td->o.timeout )
                return 1;
 
        return 0;
@@ -1461,6 +1461,7 @@ static void *thread_main(void *data)
        fio_unpin_memory(td);
 
        fio_mutex_down(writeout_mutex);
+       finalize_logs(td);
        if (td->bw_log) {
                if (o->bw_log_file) {
                        finish_log_named(td, td->bw_log,
@@ -1783,7 +1784,7 @@ static void run_threads(void)
                        if (td->o.start_delay) {
                                spent = mtime_since_genesis();
 
-                               if (td->o.start_delay * 1000 > spent)
+                               if (td->o.start_delay > spent)
                                        continue;
                        }