/** * sleep函数 * @param {any} delay */ function sleep(delay) { var start = (new Date()).getTime(); while ((new Date()).getTime() - start < delay) { continue; } }