platform/api/symfony/Component/Stopwatch/StopwatchEvent.yaml

126 lines
3.4 KiB
YAML
Raw Normal View History

2024-09-02 17:44:11 +00:00
name: StopwatchEvent
class_comment: '# * Represents an Event managed by Stopwatch.
# *
# * @author Fabien Potencier <fabien@symfony.com>'
dependencies: []
properties: []
methods:
- name: __construct
visibility: public
parameters:
- name: origin
- name: category
default: 'null'
- name: morePrecision
default: 'false'
- name: name
default: 'null'
comment: "# * Represents an Event managed by Stopwatch.\n# *\n# * @author Fabien\
\ Potencier <fabien@symfony.com>\n# */\n# class StopwatchEvent\n# {\n# /**\n#\
\ * @var StopwatchPeriod[]\n# */\n# private array $periods = [];\n# \n# private\
\ float $origin;\n# private string $category;\n# \n# /**\n# * @var float[]\n#\
\ */\n# private array $started = [];\n# \n# private string $name;\n# \n# /**\n\
# * @param float $origin The origin time in milliseconds\n# * @param\
\ string|null $category The event category or null to use the default\n#\
\ * @param bool $morePrecision If true, time is stored as float to keep\
\ the original microsecond precision\n# * @param string|null $name The\
\ event name or null to define the name as default\n# *\n# * @throws \\InvalidArgumentException\
\ When the raw time is not valid"
- name: getCategory
visibility: public
parameters: []
comment: '# * Gets the category.'
- name: getOrigin
visibility: public
parameters: []
comment: '# * Gets the origin in milliseconds.'
- name: start
visibility: public
parameters: []
comment: '# * Starts a new event period.
# *
# * @return $this'
- name: stop
visibility: public
parameters: []
comment: '# * Stops the last started event period.
# *
# * @return $this
# *
# * @throws \LogicException When stop() is called without a matching call to start()'
- name: isStarted
visibility: public
parameters: []
comment: '# * Checks if the event was started.'
- name: lap
visibility: public
parameters: []
comment: '# * Stops the current period and then starts a new one.
# *
# * @return $this'
- name: ensureStopped
visibility: public
parameters: []
comment: '# * Stops all non already stopped periods.'
- name: getPeriods
visibility: public
parameters: []
comment: '# * Gets all event periods.
# *
# * @return StopwatchPeriod[]'
- name: getLastPeriod
visibility: public
parameters: []
comment: '# * Gets the last event period.'
- name: getStartTime
visibility: public
parameters: []
comment: '# * Gets the relative time of the start of the first period in milliseconds.'
- name: getEndTime
visibility: public
parameters: []
comment: '# * Gets the relative time of the end of the last period in milliseconds.'
- name: getDuration
visibility: public
parameters: []
comment: '# * Gets the duration of the events in milliseconds (including all periods).'
- name: getMemory
visibility: public
parameters: []
comment: '# * Gets the max memory usage of all periods in bytes.'
- name: getNow
visibility: protected
parameters: []
comment: '# * Return the current time relative to origin in milliseconds.'
- name: formatTime
visibility: private
parameters:
- name: time
comment: '# * Formats a time.
# *
# * @throws \InvalidArgumentException When the raw time is not valid'
- name: getName
visibility: public
parameters: []
comment: '# * Gets the event name.'
- name: __toString
visibility: public
parameters: []
comment: null
traits: []
interfaces: []