Comments (7)
可以当网络延时严重时,利用上一次网络好的时间算出新时间。
比如客户端维护一个时间,每秒自己-1s,不停地与传过来的时间比较,取较小值。
没写过工程,口胡的。
from uoj.
不必传递时间差……改成传递 UTC 时刻就可以
from uoj.
问题是我也不确定客户端那边的时钟准不准嘛(还真不一定准),所以传 UTC 时间还是有可能导致倒计时有问题
from uoj.
所以可以在客户端维护一个时间,每次用户连接UOJ,就更新一次,取较小值。
from uoj.
@vfleaking 那只能默认时间差不变,然后测量/消除网络延时了
from uoj.
CDN大法行不行?
from uoj.
我觉得可以用timeanddate.com的时间api,但是那个似乎是外国网站
from uoj.
Related Issues (20)
- 支持测评给出的分数为小数
- 自动显示题目的时空限制 HOT 2
- 比赛如何邀请人 HOT 16
- 升级 testlib 版本 HOT 4
- 数据配置页面增加 Subtask 相关配置
- 请问能添加一个收藏题目的功能吗?
- UOJ启动失败 HOT 3
- run_program 无法执行 HOT 2
- 增加可选的邮箱地址隐藏功能
- 支持通过共享内存实现的交互题
- 希望评测时间限制可以精确到 ms HOT 1
- 一个关于 UOJContestProblem 的 PHP Warning
- 请问哪里可以下载到livecd版本呢 HOT 1
- Feature request: 从题库中题目跳转到包含它的比赛 HOT 1
- 提答题出现Judgement Failed HOT 8
- 希望代码被hack或failed extra test的时候像用户发送消息提示 HOT 1
- web/app下出现了windows下不允许的文件夹名aux
- 配置为非80端口的时候访问OJ会出现问题 HOT 1
- 建议将 aux 文件夹改为其它的名字
- docker安装后系统时间有些问题 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uoj.