Login   Register  
PHP Classes
elePHPant
Icontem

File: demo.timestamps.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of runcore  >  Time to generate a page or blocks  >  demo.timestamps.php  >  Download  
File: demo.timestamps.php
Role: Example script
Content type: text/plain
Description: example of use timestamps class
Class: Time to generate a page or blocks
Measure the time that takes to execute a script
Author: By
Last change: fix: call undefined object
Date: 9 years ago
Size: 451 bytes
 

Contents

Class file image Download
<?php

require_once('class.timeStamps.php');

// create timestamp object
$ts = new timeStamps('my block1');

// code ...
// code ...
// code ...

// add timestamp
$ts->addTime('my block2');


// code ...
// code ...
// code ...

// add timestamp
$ts->addTime('end of blocks');

// print time of execution
echo 'page generated by:'.$ts->getTimesArraySize();


// TABLE of Timestamps (DEBUG mode)
$ts->printTimesTable();

?>