public function testReset() { QTimer::start('timerA'); $this->longOperation(); $fltValue1 = QTimer::GetTime('timerA'); $this->longOperation(); $fltValue2 = QTimer::GetTime('timerA'); $this->longOperation(); $fltValue3 = QTimer::reset('timerA'); $fltValue4 = QTimer::stop('timerA'); $this->assertTrue($fltValue1 > 0); $this->assertTrue($fltValue2 > 0); $this->assertTrue($fltValue3 > 0); $this->assertTrue($fltValue4 > 0); $this->assertTrue($fltValue1 < $fltValue2); $this->assertTrue($fltValue2 < $fltValue3); $this->assertTrue($fltValue4 < $fltValue3); // because we've reset the timer $objTimer = QTimer::GetTimer('timerA'); $this->assertEquals(2, $objTimer->CountStarted); }