Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
function sleep(d){
for(var t = Date.now();Date.now() - t <= d;);
}
sleep(5000); //当前方法暂停5秒
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment