fix bug in record interval

This commit is contained in:
lyc8503 committed 2024-01-30 14:24:28 +08:00
1 parent 9262325cb8
commit 868f943f93
1 file changed
+1 -1
+1 -1
View File
@@ -199,7 +199,7 @@ export default {
time: currentTimeSecond,
}
latencyLists.recent.push(record)
if (latencyLists.all.length === 0 || currentTimeSecond - latencyLists.all[0].time > 60 * 60) {
if (latencyLists.all.length === 0 || currentTimeSecond - latencyLists.all.slice(-1)[0].time > 60 * 60) {
latencyLists.all.push(record)
}