Skip to content

Latest commit

 

History

History
20 lines (19 loc) · 371 Bytes

sleep.md

File metadata and controls

20 lines (19 loc) · 371 Bytes
function sleep(time){
  return new Promise(function(resovle){
    console.log(+new Date())
    setTimeout(resovle,time)
  })
}

sleep(1000).then(function(){
  console.log(+new Date())
})