Is there a method to put a javascript thread to sleep for a few milliseconds? This would allow for a something to move across the screen on a thread, while still allowing for other actions within the browser to work. I know setInterval can work, but it requires relaunching the functions and writing the values as a global dataset. I would like to know if there is a simple way, that when the action starts, I can pause it without having to create loops or globals.
Thanks,
Leo
Thanks,
Leo
Comment