PHP Classes

File: example.php

Recommend this page to a friend!
  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: 14 years ago
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__);

?>