Overview

Namespaces

  • Contrib
    • Bundle
      • CoverallsBundle
        • Console
        • Entity
      • CoverallsV1Bundle
        • Api
        • Collector
        • Command
        • Config
        • Entity
          • Git
    • Component
      • File
      • Log
      • System
        • Git
  • Guzzle
    • Batch
      • Exception
    • Cache
    • Common
      • Exception
    • Http
      • Curl
      • Exception
      • Message
      • QueryAggregator
    • Inflection
    • Iterator
    • Log
    • Parser
      • Cookie
      • Message
      • UriTemplate
      • Url
    • Plugin
      • Async
      • Backoff
      • Cache
      • Cookie
        • CookieJar
        • Exception
      • CurlAuth
      • ErrorResponse
        • Exception
      • History
      • Log
      • Md5
      • Mock
      • Oauth
    • Service
      • Builder
      • Command
        • Factory
        • LocationVisitor
          • Request
          • Response
      • Description
      • Exception
      • Resource
    • Stream
  • PHP
  • Psr
    • Log
  • Symfony
    • Component
      • Config
        • Definition
          • Builder
          • Exception
        • Exception
        • Loader
        • Resource
        • Util
      • Console
        • Command
        • Formatter
        • Helper
        • Input
        • Output
        • Tester
      • EventDispatcher
        • Debug
      • Finder
        • Adapter
        • Comparator
        • Exception
        • Expression
        • Iterator
        • Shell
      • Stopwatch
      • Yaml
        • Exception

Classes

  • Section
  • Stopwatch
  • StopwatchEvent
  • StopwatchPeriod
  • Overview
  • Namespace
  • Class
  • Tree
  • Todo

Class StopwatchEvent

Represents an Event managed by Stopwatch.

Namespace: Symfony\Component\Stopwatch
Author: Fabien Potencier <fabien@symfony.com>
Located at stopwatch/Symfony/Component/Stopwatch/StopwatchEvent.php
Methods summary
public
# __construct( float $origin, string $category = null )

Constructor.

Constructor.

Parameters

$origin
float
$origin The origin time in milliseconds
$category
string
$category The event category

Throws

InvalidArgumentException
When the raw time is not valid
public string
# getCategory( )

Gets the category.

Gets the category.

Returns

string
The category
public integer
# getOrigin( )

Gets the origin.

Gets the origin.

Returns

integer
The origin in milliseconds
public Symfony\Component\Stopwatch\StopwatchEvent
# start( )

Starts a new event period.

Starts a new event period.

Returns

Symfony\Component\Stopwatch\StopwatchEvent
The event
public Symfony\Component\Stopwatch\StopwatchEvent
# stop( )

Stops the last started event period.

Stops the last started event period.

Returns

Symfony\Component\Stopwatch\StopwatchEvent
The event

Throws

LogicException
When start wasn't called before stopping
LogicException
When stop() is called without a matching call to start()
public Symfony\Component\Stopwatch\StopwatchEvent
# lap( )

Stops the current period and then starts a new one.

Stops the current period and then starts a new one.

Returns

Symfony\Component\Stopwatch\StopwatchEvent
The event
public
# ensureStopped( )

Stops all non already stopped periods.

Stops all non already stopped periods.

public Symfony\Component\Stopwatch\StopwatchPeriod[]
# getPeriods( )

Gets all event periods.

Gets all event periods.

Returns

Symfony\Component\Stopwatch\StopwatchPeriod[]
An array of StopwatchPeriod instances
public integer
# getStartTime( )

Gets the relative time of the start of the first period.

Gets the relative time of the start of the first period.

Returns

integer
The time (in milliseconds)
public integer
# getEndTime( )

Gets the relative time of the end of the last period.

Gets the relative time of the end of the last period.

Returns

integer
The time (in milliseconds)
public integer
# getDuration( )

Gets the duration of the events (including all periods).

Gets the duration of the events (including all periods).

Returns

integer
The duration (in milliseconds)
public integer
# getMemory( )

Gets the max memory usage of all periods.

Gets the max memory usage of all periods.

Returns

integer
The memory usage (in bytes)
protected float
# getNow( )

Return the current time relative to origin.

Return the current time relative to origin.

Returns

float
Time in ms
php-coveralls API documentation generated by ApiGen 2.8.0