fix bug in record interval

pull/8/head
lyc8503 2024-01-30 14:24:28 +08:00
parent 9262325cb8
commit 868f943f93
1 changed files with 1 additions and 1 deletions

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)
}