Stopwatch
| Kind of class: | public class |
|---|---|
| Package: | org.casalib.time |
| Inherits from: | none |
| Implements: | |
| Known subclasses: | |
| Version: | 09/06/09 |
| Author: | Aaron Clinger, Mike Creighton |
| Classpath: | org.casalib.time.Stopwatch |
| File last modified: | Sunday, 06 September 2009, 08:45:49 |
Simple stopwatch class that records elapsed time in milliseconds.
Example:
-
package { import org.casalib.display.CasaMovieClip; import org.casalib.time.Stopwatch; public class MyExample extends CasaMovieClip { public function MyExample() { super(); var stopwatch:Stopwatch = new Stopwatch(); stopwatch.start(); var l:uint = 1000000; while (l--) { doSomething(); } trace(stopwatch.time); } public function doSomething():void { } } }
Summary
Constructor
Instance properties
Constructor
Stopwatch
public function Stopwatch (
)
Creates a new Stopwatch.
Instance properties
running
public running:Boolean
(read)
Determines if the stopwatch is currently running
true, or if it isn't false. Instance methods
start
public function start (
) : void
Starts stopwatch and resets previous elapsed time.
Specified by: