修改:delay 延时支持延时变更、取消事件

git-svn-id: svn://47.119.165.148/zhub@95 e63fbceb-bcc3-4977-ac22-735b83d8d0f4
This commit is contained in:
lxy
2021-02-01 11:18:26 +00:00
parent d6dda9e968
commit 8e1074e461
2 changed files with 25 additions and 6 deletions

View File

@@ -7,12 +7,14 @@ import (
"strconv"
"strings"
"sync"
"time"
)
var (
zsub = ZSub{
topics: make(map[string]*ZTopic),
timers: make(map[string]*ZTimer),
delays: make(map[string]*time.Timer),
}
)
@@ -20,6 +22,7 @@ type ZSub struct {
sync.RWMutex
topics map[string]*ZTopic
timers map[string]*ZTimer
delays map[string]*time.Timer
}
type ZConn struct { //ZConn