diff --git a/app.go b/app.go index ed12c7b..3610a41 100644 --- a/app.go +++ b/app.go @@ -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) }