From 91c97f1d6ab1673bc0bf8d8aa158499b00aff0c4 Mon Sep 17 00:00:00 2001 From: Sebastian Bergmann Date: Fri, 13 Jul 2001 06:40:03 +0000 Subject: [PATCH] Check-in of, yet uncomplete, PEAR/Benchmark_Timer class documentation. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@51383 c90b9560-bf6c-de11-be94-00142212c4b1 --- pear/benchmark_timer.xml | 48 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 pear/benchmark_timer.xml diff --git a/pear/benchmark_timer.xml b/pear/benchmark_timer.xml new file mode 100644 index 0000000000..00c6ac5f07 --- /dev/null +++ b/pear/benchmark_timer.xml @@ -0,0 +1,48 @@ + + + Benchmark_Timer + Timing script execution + + + ... + + + Description + + ... + + + + + +require_one 'Benchmark/Timer.php'; +$timer = new Benchmark_Timer; + +$timer->setMarker('start of for() loop'); +for ($i = 0; $i < 1000; $i++) { /* ... */ } +$timer->setMarker('end of for() loop'); + +echo 'The for() loop took ' . +$timer->timeElapsed('start of for() loop', 'end of for() loop'); + + + + + + + start + Set a default marker, called 'start'. + + + ... + + + + + stop + Set a default marker, called 'stop'. + + + ... + +