Stopwatch
A simple stopwatch that ticks every 100 ms. It can be bound to an AudioPlayer or AudioRecorder which binds the stop and playing functionality to the stopping and starting of the Watch. It can also be listened to by other entities.
Constructor Summary
Public Constructor | ||
public |
constructor(tickCb: Function) |
Method Summary
Public Methods | ||
public |
registerListener(tickCb: *) |
|
public |
reset() Reset count to 0. |
|
public |
start() Start counting and tick every 100 ms. |
|
public |
stop() Stop counting. |
|
public |
stopListening(tickCb: *) |
|
public |
tick() Invoke the tick callback with the current value. |
|
public |
update() Tick once and increment the value by 1. |