rapila
Public Member Functions | Public Attributes | Protected Attributes | List of all members
Timer Class Reference

Public Member Functions

 __construct ($name= '')
 
 startTimer ()
 
 addTime ()
 
 getCalls ()
 
 getElapsedTime ()
 

Public Attributes

 $totalTime = null
 
 $name = ''
 
 $calls = 0
 

Protected Attributes

 $startTime = null
 

Detailed Description

Timer class allows to time some PHP code. Copy of sfTimer Symfony (c) 2004-2006 Fabien Potencier fabie.nosp@m.n.po.nosp@m.tenci.nosp@m.er@s.nosp@m.ymfon.nosp@m.y-pr.nosp@m.oject.nosp@m..com

Constructor & Destructor Documentation

Timer::__construct (   $name = '')

Creates a new sfTimer instance.

Parameters
string$nameThe name of the timer

Member Function Documentation

Timer::addTime ( )

Stops the timer and add the amount of time since the start to the total time.

Returns
integer Time spend for the last call
Timer::getCalls ( )

Gets the number of calls this timer has been called to time code.

Returns
integer Number of calls
Timer::getElapsedTime ( )

Gets the total time elapsed for all calls of this timer.

Returns
integer Time in milliseconds
Timer::startTimer ( )

Starts the timer.


The documentation for this class was generated from the following file: