Namespace SS.debug.stopwatch
SS.debug.stopwatch
Defined in: SS.debug.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Stopwatch for timing the durations of events.
|
| Field Attributes | Field Name and Description |
|---|---|
| <static> |
SS.debug.stopwatch.watches
Object to hold StopwatchEvent instances referenced by an
arbitrary name.
|
| Method Attributes | Method Name and Description |
|---|---|
| <static> |
SS.debug.stopwatch.average(name)
Returns the average number of seconds that the matching stopwatches were active for.
|
| <static> |
SS.debug.stopwatch.duration(name)
Returns the number of seconds that the stopwatch was active for.
|
| <static> |
SS.debug.stopwatch.resume(name)
Resumes a current stopwatch from a stopped state or creates a new instance
of the stopwatch referenced by the specified name
|
| <static> |
SS.debug.stopwatch.start(name)
Instantiates a new StopwatchEvent stored agaisnt the assigned name.
|
| <static> |
SS.debug.stopwatch.stop(name)
Stops an active stopwatch.
|
Namespace Detail
SS.debug.stopwatch
Stopwatch for timing the durations of events. i.e how long does a peice of code take to execute.
Field Detail
<static>
SS.debug.stopwatch.watches
Object to hold StopwatchEvent instances referenced by an
arbitrary name.
Method Detail
<static>
{Number}
SS.debug.stopwatch.average(name)
Returns the average number of seconds that the matching stopwatches were active for.
I.e. Difference between the start and finish times.
- Parameters:
- {String} name
- (Optional) Name of the stopwatch. If specified, then any stopwatch which contains part of
the name will be used to calculate the average. If null then all stopwatches will be used
to calculate the average.
- Returns:
- {Number} Duration in seconds.
<static>
{Number}
SS.debug.stopwatch.duration(name)
Returns the number of seconds that the stopwatch was active for.
I.e. Difference between the start and finish times.
- Parameters:
- {String} name
- Name of the stopwatch.
- Returns:
- {Number} Duration in seconds.
<static>
SS.debug.stopwatch.resume(name)
Resumes a current stopwatch from a stopped state or creates a new instance
of the stopwatch referenced by the specified name
- Parameters:
- {String} name
- Name of the stopwatch.
- Returns:
- null
<static>
SS.debug.stopwatch.start(name)
Instantiates a new StopwatchEvent stored agaisnt the assigned name.
- Parameters:
- {String} name
- Name of the stopwatch.
- Returns:
- null
<static>
SS.debug.stopwatch.stop(name)
Stops an active stopwatch.
- Parameters:
- {String} name
- Name of the stopwatch.
- Returns:
- null
