function test_notify(\cli\Notify $notify, $cycle = 1000000, $sleep = null) { for ($i = 0; $i <= $cycle; $i++) { $notify->tick(); if ($sleep) { usleep($sleep); } } $notify->finish(); }
/** * Forces the current tick count to the total ticks given at instatiation * time before passing on to `cli\Notify::finish()`. */ public function finish() { $this->_current = $this->_total; parent::finish(); }