function l(t, i) {
  t = t || 10;
  const c = new Array(t), f = new Array(t);
  let e = 0, r = 0, d;
  return i = i !== void 0 ? i : 1e3, function(s) {
    const n = Date.now(), a = f[r];
    d || (d = n), c[e] = s, f[e] = n;
    let o = r, w = 0;
    for (; o !== e; )
      w += c[o++], o = o % t;
    if (e = (e + 1) % t, e === r && (r = (r + 1) % t), n - d < i)
      return;
    const h = a && n - a;
    return h ? Math.round(w * 1e3 / h) : void 0;
  };
}
export {
  l as default
};
//# sourceMappingURL=index.es390.js.map
