h2load: Call second_timeout_cb manually so that we don't waste first 1 second

This commit is contained in:
Tatsuhiro Tsujikawa 2015-07-19 17:31:35 +09:00
parent 006ac7b1b0
commit cce64e6728
1 changed files with 4 additions and 0 deletions

View File

@ -1594,6 +1594,10 @@ int main(int argc, char **argv) {
ev_init(&timeout_watcher, second_timeout_cb);
timeout_watcher.repeat = 1.;
ev_timer_again(rate_loop, &timeout_watcher);
// call callback so that we don't waste first 1 second.
second_timeout_cb(rate_loop, &timeout_watcher, 0);
ev_run(rate_loop, 0);
} // end rate mode section