summaryrefslogtreecommitdiff
path: root/test/pummel/test-timer-wrap.js
blob: 659912d1fc28ce2599485f3fd187aba0d8b92653 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
'use strict';
const common = require('../common');

var Timer = process.binding('timer_wrap').Timer;
var kOnTimeout = Timer.kOnTimeout;

var t = new Timer();

t.start(1000);

t[kOnTimeout] = common.mustCall(function() {
  console.log('timeout');
  t.close();
});