mirror of
https://github.com/PlayEdu/PlayEdu
synced 2025-09-11 13:13:48 +08:00
学员真实观看时长计算考虑到网络延迟
This commit is contained in:
parent
6b23dfe77b
commit
7f9ca140da
@ -52,8 +52,8 @@ public class UserBus {
|
|||||||
|
|
||||||
// 最近一次学习时间
|
// 最近一次学习时间
|
||||||
Long lastTime = userLastLearnTimeCache.get(FCtx.getId());
|
Long lastTime = userLastLearnTimeCache.get(FCtx.getId());
|
||||||
// 最大周期为10s
|
// 最大周期为10s+0.5s的网络延迟
|
||||||
if (lastTime == null || curTime - lastTime > 10000) {
|
if (lastTime == null || curTime - lastTime > 10500) {
|
||||||
lastTime = curTime - 10000;
|
lastTime = curTime - 10000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user