Tool to display Walter Giers' notebooks in either chronological or in random order
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Timer.pde 345B

12345678910111213141516
  1. class Timer {
  2. float time;
  3. int starttime, lasttime;
  4. Timer(float t) {
  5. time = t;
  6. starttime = second();
  7. lasttime = starttime;
  8. }
  9. void update() {
  10. if (millis() - starttime >= lasttime + time) {
  11. lasttime = millis();
  12. //runs once every time "time" (millis as float) passed:
  13. nextSlide(autoplayMode);
  14. }
  15. }
  16. }