mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 07:53:06 +01:00
1b99093df7
The `repeat` param in `start(timeout, repeat)` was 0 in all callsites. PR-URL: https://github.com/nodejs/node/pull/7994 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
15 lines
263 B
JavaScript
15 lines
263 B
JavaScript
'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();
|
|
});
|