Permalink
Browse files

NODE_DEBUG=timer instead of bitflags

  • Loading branch information...
1 parent 82e9da9 commit 86160a88079ab87b014131974697bf0320fb07e8 @ry ry committed Jan 12, 2011
Showing with 3 additions and 7 deletions.
  1. +3 −7 lib/timers.js
View
@@ -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();
}
}

0 comments on commit 86160a8

Please sign in to comment.