0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-28 22:46:31 +01:00
nodejs/test/parallel/test-timers-unref-call.js
Ben Noordhuis 767ee73486 test: strip copyright boilerplate
Commit 3e1b1dd missed a few files in test/parallel, this commit
rectifies that.

Only test/parallel/test-url.js still has a copyright header.  I left
it in because the original author is neither an io.js contributor nor
a StrongLoop employee.

PR-URL: https://github.com/iojs/io.js/pull/527
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-01-20 23:25:19 +01:00

12 lines
306 B
JavaScript

var common = require('../common');
var Timer = process.binding('timer_wrap').Timer;
Timer.now = function() { return ++Timer.now.ticks; };
Timer.now.ticks = 0;
var t = setInterval(function() {}, 1);
var o = { _idleStart: 0, _idleTimeout: 1 };
t.unref.call(o);
setTimeout(clearInterval.bind(null, t), 2);