优化定时器

This commit is contained in:
boyce
2020-10-28 11:30:22 +08:00
parent 019989fe2c
commit 7de290b553
5 changed files with 24 additions and 17 deletions

View File

@@ -139,7 +139,7 @@ func (slf *Service) Run() {
analyzer = nil
}
case t := <- slf.dispatcher.ChanTimer:
if t.IsStop() == false {
if t.IsClose() == false {
if slf.profiler != nil {
analyzer = slf.profiler.Push(fmt.Sprintf("Timer_%s", t.AdditionData.(*timer.Timer).GetFunctionName()))
}