Browse Source

timers: remove redundant code

PR-URL: https://github.com/iojs/io.js/pull/1330
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
v1.8.0-commit
Fedor Indutny 10 years ago
parent
commit
416499c872
  1. 11
      lib/timers.js

11
lib/timers.js

@ -157,15 +157,8 @@ exports.enroll = function(item, msecs) {
// it will reset its timeout. // it will reset its timeout.
exports.active = function(item) { exports.active = function(item) {
var msecs = item._idleTimeout; var msecs = item._idleTimeout;
if (msecs >= 0) { if (msecs >= 0)
var list = lists[msecs]; insert(item, msecs);
if (!list || L.isEmpty(list)) {
insert(item, msecs);
} else {
item._idleStart = Timer.now();
L.append(list, item);
}
}
}; };

Loading…
Cancel
Save