update
This commit is contained in:
8
lib/adaptive-poll.js
Normal file
8
lib/adaptive-poll.js
Normal file
@@ -0,0 +1,8 @@
|
||||
'use strict';
|
||||
|
||||
function computePollMs(base, visible, { cap = 4000 } = {}) {
|
||||
if (visible) return base;
|
||||
return Math.min(base * 2, cap);
|
||||
}
|
||||
|
||||
module.exports = { computePollMs };
|
||||
Reference in New Issue
Block a user