time: use bool for ramp time
authorJens Axboe <axboe@kernel.dk>
Wed, 13 Sep 2017 15:07:25 +0000 (09:07 -0600)
committerJens Axboe <axboe@kernel.dk>
Wed, 13 Sep 2017 15:07:25 +0000 (09:07 -0600)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fio.h
time.c

diff --git a/fio.h b/fio.h
index da950ef..8814d84 100644 (file)
--- a/fio.h
+++ b/fio.h
@@ -335,7 +335,7 @@ struct thread_data {
        struct timespec terminate_time;
        unsigned int ts_cache_nr;
        unsigned int ts_cache_mask;
-       unsigned int ramp_time_over;
+       bool ramp_time_over;
 
        /*
         * Time since last latency_window was started
diff --git a/time.c b/time.c
index 28c2071..c887682 100644 (file)
--- a/time.c
+++ b/time.c
@@ -105,7 +105,7 @@ static bool parent_update_ramp(struct thread_data *td)
                return false;
 
        reset_all_stats(parent);
-       parent->ramp_time_over = 1;
+       parent->ramp_time_over = true;
        td_set_runstate(parent, TD_RAMP);
        return true;
 }
@@ -116,7 +116,7 @@ bool ramp_time_over(struct thread_data *td)
                return true;
 
        if (utime_since_now(&td->epoch) >= td->o.ramp_time) {
-               td->ramp_time_over = 1;
+               td->ramp_time_over = true;
                reset_all_stats(td);
                td_set_runstate(td, TD_RAMP);