[ Index ]
 

Code source de PHP PEAR 1.4.5

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/docs/Benchmark/doc/ -> timer_example.php (source)

   1  <?php
   2  require '../Timer.php';
   3  
   4  function wait($amount) {
   5      for ($i=0; $i < $amount; $i++) {
   6          for ($i=0; $i < 100; $i++);
   7      }
   8  }
   9  // Pass the param "true" to constructor to automatically display the results
  10  $timer = new Benchmark_Timer();
  11  $timer->start();
  12  wait(10);
  13  $timer->setMarker('Mark1');
  14  echo "Elapsed time between Start and Mark1: " .
  15        $timer->timeElapsed('Start', 'Mark1') . "\n";
  16  wait(50);
  17  $timer->stop();
  18  $timer->display();


Généré le : Sun Feb 25 14:08:00 2007 par Balluche grâce à PHPXref 0.7