Browse Source

NODE_DEBUG=timer instead of bitflags

v0.7.4-release
Ryan Dahl 14 years ago
parent
commit
86160a8807
  1. 10
      lib/timers.js

10
lib/timers.js

@ -1,12 +1,8 @@
var Timer = process.binding('timer').Timer;
var assert = process.assert;
/*
* To enable debug statements for the timers do NODE_DEBUG=8 ./node script.js
*/
var debugLevel = parseInt(process.env.NODE_DEBUG, 16);
var debug;
if (debugLevel & 0x8) {
if (process.env.NODE_debug && /timer/.test(process.env.NODE_debug)) {
debug = function() { require('util').error.apply(this, arguments); };
} else {
debug = function() { };
@ -117,9 +113,9 @@ var unenroll = exports.unenroll = function(item) {
var list = lists[item._idleTimeout];
// if empty then stop the watcher
//debug('unenroll');
debug('unenroll');
if (list && list._idlePrev == list) {
//debug('unenroll: list empty');
debug('unenroll: list empty');
list.stop();
}
}

Loading…
Cancel
Save