/** * {@inheritdoc} */ public function reset() { parent::reset(); $this->scheduler = new \SplPriorityQueue(); $this->readStreams = []; $this->readWatchers = []; $this->writeStreams = []; $this->writeWatchers = []; $this->signalWatchers = []; }
public function testTimeMove() { $Loop = new Loop(new Object(array(Object::TIME => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10)))); $Loop->moveTime(2); $this->assertEquals(2, $Loop->current(Object::TIME)); $Loop->moveTime(5); $this->assertEquals(7, $Loop->current(Object::TIME)); $Loop->reset(); $Loop->moveToTime(7); $this->assertEquals(7, $Loop->current(Object::TIME)); $Loop->moveToTime(10); $this->assertEquals(10, $Loop->current(Object::TIME)); }
/** * {@inheritdoc} */ public function reset() { parent::reset(); $this->loop->stop(); }