This commit is contained in:
aozhiwei 2024-05-09 19:11:03 +08:00
parent 3ec5583dc5
commit 55494b3002

5
app.go
View File

@ -31,6 +31,7 @@ type App interface {
GetNowMillis() int64
GetNowNano() int64
GetRealSeconds() int64
GetRealMills() int64
GetTimeOffset() int32
SetTimeOffset(int32)
GetLocation() *time.Location
@ -298,6 +299,10 @@ func (this *app) GetNowNano() int64 {
}
func (this *app) GetRealSeconds() int64 {
return time.Now().UnixNano() / int64(time.Second)
}
func (this *app) GetRealMills() int64 {
return time.Now().UnixNano() / int64(time.Millisecond)
}