symfony API

sfTimer Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

1.3 API OpenSearch

Packages

You are currently browsing the symfony API for the 1.3 version. Switch to:

sfTimer class allows to time some PHP code.

Method Summary

  • float addTime()
    Stops the timer and add the amount of time since the start to the total time.
  • integer getCalls()
    Gets the number of calls this timer has been called to time code.
  • float getElapsedTime()
    Gets the total time elapsed for all calls of this timer.
  • startTimer()
    Starts the timer.
  • __construct($name)
    Creates a new sfTimer instance.

Method Details

  • (float) addTime () Browse code

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

    returns Time spend for the last call

  • (integer) getCalls () Browse code

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

    returns Number of calls

  • (float) getElapsedTime () Browse code

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

    returns Time in seconds

  • startTimer () Browse code

    Starts the timer.

  • __construct ($name) Browse code

    $name The name of the timer

    Creates a new sfTimer instance.