ControlTimer

description
control timer is a timer that can be used e.g. as a stop watch.
+Example
import controlP5.*;

ControlP5 controlP5;
ControlTimer c;
Textlabel t;

void setup() {
  size(400,400);
  frameRate(30);
  controlP5 = new ControlP5(this);
  c = new ControlTimer();
  t = new Textlabel(this,"--",10,10);
  c.setSpeedOfTime(1);
}


void draw() {
  background(0);
  t.setValue(c.toString());
  t.draw(this);
  t.setPosition(mouseX, mouseY);
}


void mousePressed() {
  c.reset();
}
constructors
ControlTimer();
Methods
day ( )
day position of the timer.
hour ( )
Hour position of the timer in international format (0-23).
millis ( )
Get the milliseconds of the timer.
minute ( )
Minutes position of the timer.
reset ( )
reset the timer.
second ( )
Seconds position of the timer.
setSpeedOfTime ( )
set the speed of time, for slow motion or high speed.
time ( )
get the time in milliseconds since the timer was started.
toString ( )
return a string representation of the current status of the timer.
usage
Web & Application
related