Stopwatch
| Kind of class: | public class |
|---|---|
| Package: | org.casalib.time |
| Inherits from: | none |
| Implements: | |
| Known subclasses: | |
| Version: | 10/25/08 |
| Author: | Aaron Clinger, Mike Creighton |
| Classpath: | org.casalib.time.Stopwatch |
| File last modified: | Monday, 01 December 2008, 11:16:36 |
Simple stopwatch class that records elapsed time in milliseconds.
Example:
-
package { import flash.display.MovieClip; import org.casalib.time.Stopwatch; public class MyExample extends MovieClip { 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
Stopwatch
public function Stopwatch (
)
Creates a new Stopwatch.
Instance properties
Instance methods
start
public function start (
) : void
Starts stopwatch and resets previous elapsed time.
Specified by: