This commit is contained in:
azw 2023-08-20 15:33:01 +08:00
parent db269c8df5
commit dd20317307

11
app.go
View File

@ -19,8 +19,9 @@ type App interface {
AddIMMsg(uint16, q5.Args)
RegisterIMMsgHandle(uint16, func(q5.Args))
NotifyLoopCond()
NowUnix() int64
NowUnixMilli() int64
GetNowSeconds() int64
GetNowMillis() int64
GetNowNano() int64
RegisterMainThreadCb(func ())
}
@ -200,15 +201,15 @@ func (this *app) NotifyLoopCond() {
this.loopCond.Broadcast()
}
func (this *app) NowUnix() int64 {
func (this *app) GetNowSeconds() int64 {
return this.nowUnixNano / int64(time.Second)
}
func (this *app) NowUnixMilli() int64 {
func (this *app) GetNowMillis() int64 {
return this.nowUnixNano / int64(time.Millisecond)
}
func (this *app) NowUnixNano() int64 {
func (this *app) GetNowNano() int64 {
return this.nowUnixNano
}