1
This commit is contained in:
parent
1e3cee60cc
commit
7b77926b4b
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user