let lastReceivedAt = new Date(); export let rps = 0; export let packageCounts = 0; export const markReceive = () => { const now = new Date(); rps = (1000 / (now.getTime() - lastReceivedAt.getTime())).toFixed(2); lastReceivedAt = now; packageCounts++; }