This commit is contained in:
aozhiwei 2024-05-25 11:47:07 +08:00
parent 1e3cee60cc
commit 7b77926b4b

View File

@ -3,6 +3,7 @@ package session
import (
"q5"
"f5"
"time"
"sync"
)
@ -27,6 +28,7 @@ func (this *sessionMgr) Init() {
this,
60,
10000)
go this.updateTimer()
}
func (this *sessionMgr) UnInit() {
@ -61,3 +63,12 @@ func (this *sessionMgr) getSession(accountId string) *userSession {
return nil
}
}
func (this *sessionMgr) updateTimer() {
for true {
this.lock.Lock()
this.timer.Update()
this.lock.Unlock()
time.Sleep(1 * time.Second);
}
}