コード例 #1
0
ファイル: timer.php プロジェクト: tomVertuoz/framework
		instance:<br>
	<pre><code>$objTimer = QTimer::GetTimer('timerName');
echo $objTimer->CountStarted;</code></pre>				

	<p>Take a look at a sample usage example below by clicking View Source.</p>
</div>

<div id="demoZone">
<?php 
QTimer::start('longCalculation');
for ($i = 0; $i < 1000000; $i++) {
    // do nothing - just loop a bunch of times
}
QTimer::stop('longCalculation');
echo "Here's how long it took to execute the long calculation: " . QTimer::getTime('longCalculation') . "<br /><br />";
QTimer::start('loadPersons');
$arrPersons = Person::LoadAll();
QTimer::stop('loadPersons');
// resume the long calculation timer
QTimer::start('longCalculation');
for ($i = 0; $i < 1000000; $i++) {
    // do nothing - just loop a bunch of times
}
QTimer::stop('longCalculation');
echo "<strong>Results of QTimer::varDump():</strong><br>";
QTimer::varDump();
?>
</div>

<?php 
require '../includes/footer.inc.php';
コード例 #2
0
 public function testExceptions3()
 {
     QTimer::start('timer6');
     $this->setExpectedException("QCallerException");
     QTimer::start('timer6');
 }
コード例 #3
0
ファイル: QTimerTests.php プロジェクト: tomVertuoz/framework
 public function testExceptions3()
 {
     QTimer::start('timer6');
     $this->expectException("QCallerException", "Should not be able to start the timer twice");
     QTimer::start('timer6');
 }