优化代码

This commit is contained in:
刘祥超
2023-10-11 14:07:13 +08:00
parent 47e8761209
commit f01eae3590
4 changed files with 45 additions and 3 deletions

View File

@@ -33,7 +33,7 @@ func (this *Manager) init() {
for range this.ticker.C {
var currentTime = time.Now().Unix()
if lastTimestamp == 0 {
lastTimestamp = currentTime - 3600
lastTimestamp = currentTime - 86400 // prevent timezone changes
}
if currentTime >= lastTimestamp {