离线时间优化
This commit is contained in:
parent
7300228870
commit
9839a1ee11
@ -69,6 +69,9 @@ func (b *Base) Login() int64 {
|
||||
b.LoginDay += 1
|
||||
}
|
||||
logoutDuration := Now - b.LogoutTime
|
||||
if b.LogoutTime == 0 {
|
||||
logoutDuration = 0
|
||||
}
|
||||
b.LoginTime = Now
|
||||
b.LogoutTime = 0
|
||||
return logoutDuration
|
||||
|
||||
Loading…
Reference in New Issue
Block a user