Spiderscript Home
Class Index | File Index

Classes




Spiderscript Home
Class Index | File Index

Classes




Namespace SS.stopwatch

SS.stopwatch
Defined in: SS.debug.js.

Namespace Summary
Constructor Attributes Constructor Name and Description
 
Stopwatch for timing the durations of events.
Field Summary
Field Attributes Field Name and Description
<static>  
SS.stopwatch.watches
Object to hold StopwatchEvent instances referenced by an arbitrary name.
Method Summary
Method Attributes Method Name and Description
<static>  
SS.stopwatch.average(name)
Returns the average number of seconds that the matching stopwatches were active for.
<static>  
SS.stopwatch.duration(name)
Returns the number of seconds that the stopwatch was active for.
<static>  
SS.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.stopwatch.start(name)
Instantiates a new StopwatchEvent stored agaisnt the assigned name.
<static>  
SS.stopwatch.stop(name)
Stops an active stopwatch.
Namespace Detail
SS.stopwatch
Stopwatch for timing the durations of events. i.e how long does a peice of code take to execute.
Field Detail
<static> SS.stopwatch.watches
Object to hold StopwatchEvent instances referenced by an arbitrary name.
Method Detail
<static> {Number} SS.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.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.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.stopwatch.start(name)
Instantiates a new StopwatchEvent stored agaisnt the assigned name.
Parameters:
{String} name
Name of the stopwatch.
Returns:
null

<static> SS.stopwatch.stop(name)
Stops an active stopwatch.
Parameters:
{String} name
Name of the stopwatch.
Returns:
null

Documentation generated by JsDoc Toolkit 2.1.0 on Mon Aug 17 2009 08:23:28 GMT+0100 (BST)