mirror of https://github.com/nodejs/node.git
18 lines
281 B
JavaScript
18 lines
281 B
JavaScript
|
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);
|