mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
timers: remove redundant code
PR-URL: https://github.com/iojs/io.js/pull/1330 Reviewed-by: Trevor Norris <trev.norris@gmail.com>
This commit is contained in:
parent
6f72d87c27
commit
416499c872
@ -157,15 +157,8 @@ exports.enroll = function(item, msecs) {
|
||||
// it will reset its timeout.
|
||||
exports.active = function(item) {
|
||||
var msecs = item._idleTimeout;
|
||||
if (msecs >= 0) {
|
||||
var list = lists[msecs];
|
||||
if (!list || L.isEmpty(list)) {
|
||||
insert(item, msecs);
|
||||
} else {
|
||||
item._idleStart = Timer.now();
|
||||
L.append(list, item);
|
||||
}
|
||||
}
|
||||
if (msecs >= 0)
|
||||
insert(item, msecs);
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user