function sleep(d){ for(var t = Date.now();Date.now() - t <= d;);} 转载于:https://www.cnblogs.com/jiftle/p/7552605.html