From c6e4546c133727b954c0f6745e70dadbeab50f1a Mon Sep 17 00:00:00 2001 From: azw Date: Sun, 13 Aug 2023 11:53:20 +0800 Subject: [PATCH] 1 --- app.go | 10 +++++----- global.go => export.go | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) rename global.go => export.go (90%) diff --git a/app.go b/app.go index da6b5f1..b0217c6 100644 --- a/app.go +++ b/app.go @@ -58,8 +58,8 @@ func (this *app) init(userApp UserApp) { this.userApp = userApp this.nowTime = time.Now() atomic.StoreInt64(&this.nowUnixNano, this.nowTime.UnixNano()) - _Timer = &Timer{} - _Timer.init() + _timer = &Timer{} + _timer.init() _SysLog = new(SysLog_) _SysLog.Init() _TgLog = new(TGLog_) @@ -87,8 +87,8 @@ func (this *app) init(userApp UserApp) { func (this *app) unInit() { this.chGoLoopTimerExit <- 1 - _Timer.unInit() - _Timer = nil + _timer.unInit() + _timer = nil this.userApp.UnInit() } @@ -98,7 +98,7 @@ func (this *app) run() { atomic.StoreInt64(&this.nowUnixNano, this.nowTime.UnixNano()) beginTick := q5.GetTickCount() - _Timer.update() + _timer.update() this.dispatchIMMsg() this.userApp.Update() this.schedule() diff --git a/global.go b/export.go similarity index 90% rename from global.go rename to export.go index 1c17c5a..e9fd081 100644 --- a/global.go +++ b/export.go @@ -1,12 +1,12 @@ package f5 var _app *app -var _Timer *Timer +var _timer *Timer var _SysLog *SysLog_ var _TgLog *TGLog_ func GetTimer() *Timer { - return _Timer + return _timer } func SysLog() *SysLog_ {