-
-
Save jackfranklin/4176179 to your computer and use it in GitHub Desktop.
How to hang JavaScript (useful - to me - for slowing down code and testing)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function hang(n) { | |
var x = new XMLHttpRequest(); | |
x.open('GET', 'http://hang.nodester.com/script.js?' + n, false); | |
x.send(); | |
} | |
// usage: hang(2 * 1000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment