The resource loading... loading...

Example - Timing test of WeChat message push

Author: Inventors quantify - small dreams, Date: 2016-05-13 19:29:47
Tags: PushMessage

We have also been testing the timing of WeChat message pushing.


function main(){
    var initTime = (new Date()).getTime() ;
    Log("程序起始时间:",$.getTimeByNormal(initTime) );
    var preDif = 0;
    var str = "";
    while(true){
        var nowTime = (new Date()).getTime();
        if(  Math.floor((nowTime - initTime) / (1000*60*10) ) !== preDif ){
            str = $.getTimeByNormal(nowTime);
            Log("从程序开始执行,已过10分钟!提醒。"+"--现在时间:"+str+"推送微信@" );
            preDif = Math.floor((nowTime - initTime) / (1000*60*10) ) ;
        }
        Sleep(2000); 
    }
}

Related

More