Chgtaxihe's blog Chgtaxihe's blog
首页
练习
算法学习
读书笔记
小玩意

Chgtaxihe

首页
练习
算法学习
读书笔记
小玩意
  • 网络测试
    • 延时测试
  • Codeforces 做题情况展示
  • 手写图片生成器

网络测试

# 延时测试

<script>
$.ping = function(option) 
{
    var ping, requestTime, responseTime ;
    $.ajax({
        url: option.url+'/speed_test'+ (new Date()).getTime() + '.html',
        type: 'GET',
        dataType: 'html',
        timeout: 10000,
        beforeSend : function() 
        {
            console.log('speed_test:' + option.url);
            if(option.beforePing) option.beforePing();
            requestTime = new Date().getTime();
        },
        complete : function() 
        {
            responseTime = new Date().getTime();
            ping = Math.abs(requestTime - responseTime);
            if(option.afterPing) option.afterPing(ping);
        }
    });
    if(option.interval && option.interval > 0)
    {
        var interval = option.interval * 1000;
        setTimeout(function(){$.ping(option)}, interval);
    }
};
</script>

<div id="msg" ></div>
<script type="text/javascript">
var domain = window.location.href;
</script>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

100M测速文件 (opens new window)

1000M测速文件 (opens new window)

上次更新: 2021/02/25, 00:14:46
Codeforces 做题情况展示

Codeforces 做题情况展示→

最近更新
01
深入理解Java虚拟机
03-04
02
DNS工作原理
02-27
03
改用VuePress啦
02-23
更多文章>
Theme by Vdoing | Copyright © 2019-2021
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式