// the main function - creates lists on demand and the watchers associated
// with them.
function insert(item, msecs) {
- item._idleStart = new Date();
+ item._idleStart = Date.now();
item._idleTimeout = msecs;
if (msecs < 0) return;
list.ontimeout = function() {
debug('timeout callback ' + msecs);
- var now = new Date();
- debug('now: ' + now);
+ var now = Date.now();
+ debug('now: ' + (new Date(now)));
var first;
while (first = L.peek(list)) {
if (!list || L.isEmpty(list)) {
insert(item, msecs);
} else {
- item._idleStart = new Date();
+ item._idleStart = Date.now();
L.append(list, item);
}
}