node/test/pummel/test-timer-wrap.js

18 lines
281 B
JavaScript
Raw Normal View History

2011-05-26 01:16:36 +08:00
var common = require('../common');
var assert = require('assert');
var Timer = process.binding('timer_wrap').Timer;
var t = new Timer();
t.ontimeout = function() {
console.log('timeout');
t.close();
};
t.onclose = function() {
console.log('close');
};
t.start(1000, 0);