Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Jeff Redding  >  TimeCheck  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: A simple example
Class: TimeCheck
Measure elapsed time and mark PHP execution events
Author: By
Last change:
Date: 10 years ago
Size: 303 bytes
 

Contents

Class file image Download
<?php
include "TimeCheck.inc";

$tc = new TimeCheck();

$tc->begin("Starting timer...");

for (
$i=0$i<10000$i++)
    
$z $i 33;

$tc->mark("Loop1 Complete");

sleep(30);

$tc->mark("Sleep Complete");

for (
$i=0$i<10000$i++)
    
$z $i 44;

$tc->mark("Loop2 Complete");

$tc->displayMarks();

?>