Skip to content

Instantly share code, notes, and snippets.

@johnryan1982
Created July 13, 2012 19:51
Show Gist options
  • Save johnryan1982/3107002 to your computer and use it in GitHub Desktop.
Save johnryan1982/3107002 to your computer and use it in GitHub Desktop.
JS wait functionality
// credit to Sean McManus
// from http://www.sean.co.uk/a/webdesign/javascriptdelay.shtm
function wait( ms ) {
ms += new Date().getTime();
while ( new Date() < ms ){}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment