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 ben bi  >  TimeConsumer  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: example file
Class: TimeConsumer
Measure the time a script takes to execute
Author: By
Last change:
Date: 2009-04-03 00:19
Size: 504 bytes
 

Contents

Class file image Download
<?php
require_once("TimeConsumer.php");

TimeConsumer::setTimeZone('Asia/Shanghai');
//    TimeConsumer::setTimeZone('Europe/Paris');
TimeConsumer::microTimeStart();




TimeConsumer::startTimePrintOut("Cron script");
// wait for 1 seconds
usleep(1000000);

TimeConsumer::startTimePrintOut("ftp start");
usleep(500000);

TimeConsumer::endTimePrintOut("ftp end");



TimeConsumer::printOut();
TimeConsumer::startTimePrintOut(__FILE__);
TimeConsumer::endTimePrintOut(__FILE__);

?>