From 4196be22f321b136fba96ddbdb026fe656649ad4 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Sat, 25 May 2024 11:48:51 +0800 Subject: [PATCH] 1 --- server/statserver/session/sessionmgr.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/statserver/session/sessionmgr.go b/server/statserver/session/sessionmgr.go index 7c80367d..bc66622b 100644 --- a/server/statserver/session/sessionmgr.go +++ b/server/statserver/session/sessionmgr.go @@ -10,7 +10,7 @@ import ( type userSession struct { accountId string sessionId string - lastUpdateTick int64 + lastUpdateTime int64 } type sessionMgr struct { @@ -37,13 +37,13 @@ func (this *sessionMgr) UnInit() { func (this *sessionMgr) UpdateSession(accountId string, sessionId string) { session := this.getSession(accountId) if session != nil { - session.lastUpdateTick = q5.GetTickCount() + session.lastUpdateTime = f5.GetApp().GetRealSeconds() return } this.lock.Lock() session = this.getSession(accountId) if session != nil { - session.lastUpdateTick = q5.GetTickCount() + session.lastUpdateTime = f5.GetApp().GetRealSeconds() this.lock.Unlock() return } @@ -51,7 +51,7 @@ func (this *sessionMgr) UpdateSession(accountId string, sessionId string) { session = new(userSession) session.accountId = accountId session.sessionId = sessionId - session.lastUpdateTick = q5.GetTickCount() + session.lastUpdateTime = f5.GetApp().GetRealSeconds() this.idHash.Store(accountId, session) this.lock.Unlock() }