优化代码:使用fasttime取代以往的utils.UnixTime

This commit is contained in:
刘祥超
2023-04-08 12:47:04 +08:00
parent 0b441021d8
commit a7c7c73f70
22 changed files with 208 additions and 137 deletions

View File

@@ -1,7 +1,7 @@
package caches
import (
"github.com/TeaOSLab/EdgeNode/internal/utils"
"github.com/TeaOSLab/EdgeNode/internal/utils/fasttime"
"strings"
"time"
)
@@ -36,7 +36,7 @@ type Item struct {
}
func (this *Item) IsExpired() bool {
return this.ExpiredAt < utils.UnixTime()
return this.ExpiredAt < fasttime.Now().Unix()
}
func (this *Item) TotalSize() int64 {