Method | Description | |
---|---|---|
Add ( ) : Primitive |
Create a new stopwatch.
|
|
DelayUpTo ( Primitive delay ) : void |
Delay up to a maximum interval since the last time this is called. Useful in a game loop to maintain an even play speed.
|
|
ElapsedMilliseconds ( Primitive stopwatch ) : Primitive |
Gets the total elapsed time measured in milliseconds.
|
|
ElapsedTicks ( Primitive stopwatch ) : Primitive |
Gets the total elapsed time measured in timer ticks for very short intervals.
|
|
Reset ( Primitive stopwatch ) : void |
Stops the current stopwatch and resets the elapsed time to 0.
|
|
Restart ( Primitive stopwatch ) : void |
Stops the current stopwatch, resets the elapsed time to 0 and restarts the stopwatch.
|
|
Start ( Primitive stopwatch ) : void |
Starts or resumes the current stopwatch.
|
|
Stop ( Primitive stopwatch ) : void |
Stops the current stopwatch.
|
Method | Description | |
---|---|---|
GetNewWatch ( ) : string |
public static DelayUpTo ( Primitive delay ) : void | ||
delay | Primitive | The maximum delay in ms. |
return | void |
public static ElapsedMilliseconds ( Primitive stopwatch ) : Primitive | ||
stopwatch | Primitive | The stopwatch name. |
return | Primitive |
public static ElapsedTicks ( Primitive stopwatch ) : Primitive | ||
stopwatch | Primitive | The stopwatch name. |
return | Primitive |
public static Reset ( Primitive stopwatch ) : void | ||
stopwatch | Primitive | The stopwatch name. |
return | void |
public static Restart ( Primitive stopwatch ) : void | ||
stopwatch | Primitive | The stopwatch name. |
return | void |
public static Start ( Primitive stopwatch ) : void | ||
stopwatch | Primitive | The stopwatch name. |
return | void |
public static Stop ( Primitive stopwatch ) : void | ||
stopwatch | Primitive | The stopwatch name. |
return | void |