优化
This commit is contained in:
parent
d3f9dbb577
commit
08fc6792a2
@ -11,9 +11,9 @@ type IService interface {
|
||||
RunOnce(cb func())
|
||||
RunWait(cb func() (retValue any)) (retValue any, err error)
|
||||
|
||||
NewTimer(duration time.Duration, cb func(), needLog bool, desc ...string) uint32
|
||||
CancelTimer(timerId uint32)
|
||||
CancelAllTimer()
|
||||
// NewTimer(duration time.Duration, cb func(), needLog bool, desc ...string) uint32
|
||||
// CancelTimer(timerId uint32)
|
||||
// CancelAllTimer()
|
||||
|
||||
// 向服务内部消息管道写入消息
|
||||
Write(msg []byte) error
|
||||
|
11
timer/interface.go
Normal file
11
timer/interface.go
Normal file
@ -0,0 +1,11 @@
|
||||
package timer
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type ITimer interface {
|
||||
NewTimer(duration time.Duration, cb func(), needLog bool, desc ...string) uint32
|
||||
CancelTimer(timerId uint32)
|
||||
CancelAllTimer()
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user