This commit is contained in:
azw 2023-08-13 11:53:20 +08:00
parent 57695a25f4
commit c6e4546c13
2 changed files with 7 additions and 7 deletions

10
app.go
View File

@ -58,8 +58,8 @@ func (this *app) init(userApp UserApp) {
this.userApp = userApp this.userApp = userApp
this.nowTime = time.Now() this.nowTime = time.Now()
atomic.StoreInt64(&this.nowUnixNano, this.nowTime.UnixNano()) atomic.StoreInt64(&this.nowUnixNano, this.nowTime.UnixNano())
_Timer = &Timer{} _timer = &Timer{}
_Timer.init() _timer.init()
_SysLog = new(SysLog_) _SysLog = new(SysLog_)
_SysLog.Init() _SysLog.Init()
_TgLog = new(TGLog_) _TgLog = new(TGLog_)
@ -87,8 +87,8 @@ func (this *app) init(userApp UserApp) {
func (this *app) unInit() { func (this *app) unInit() {
this.chGoLoopTimerExit <- 1 this.chGoLoopTimerExit <- 1
_Timer.unInit() _timer.unInit()
_Timer = nil _timer = nil
this.userApp.UnInit() this.userApp.UnInit()
} }
@ -98,7 +98,7 @@ func (this *app) run() {
atomic.StoreInt64(&this.nowUnixNano, this.nowTime.UnixNano()) atomic.StoreInt64(&this.nowUnixNano, this.nowTime.UnixNano())
beginTick := q5.GetTickCount() beginTick := q5.GetTickCount()
_Timer.update() _timer.update()
this.dispatchIMMsg() this.dispatchIMMsg()
this.userApp.Update() this.userApp.Update()
this.schedule() this.schedule()

View File

@ -1,12 +1,12 @@
package f5 package f5
var _app *app var _app *app
var _Timer *Timer var _timer *Timer
var _SysLog *SysLog_ var _SysLog *SysLog_
var _TgLog *TGLog_ var _TgLog *TGLog_
func GetTimer() *Timer { func GetTimer() *Timer {
return _Timer return _timer
} }
func SysLog() *SysLog_ { func SysLog() *SysLog_ {