Files
profile/themes/keepit/node_modules/timers-browserify/example/enroll/js/main.js
Spencer Pincott 97737ca1ae Initial commit
2024-07-15 22:20:13 -04:00

15 lines
314 B
JavaScript

var timers = require('timers');
var obj = {
_onTimeout: function() {
console.log('Timer ran for: ' + (new Date().getTime() - obj.now) + ' ms');
},
start: function() {
console.log('Timer should run for 100 ms');
this.now = new Date().getTime();
timers.enroll(this, 100);
}
};
obj.start();