overte/examples/timer.js
2014-01-31 16:40:24 -08:00

5 lines
202 B
JavaScript

var timer = new Timer();
timer.interval = 1000;
timer.singleShot = true; // set this is you only want the timer to fire once
timer.timeout.connect(function() { print("TIMER FIRED!"); });
timer.start();