https://www.reddit.com/r/javascript/comments/6hgxbb/stopping_a_while_loop_after_a_certain_time_much/
// use mili secoonds
var startTime = Date.now(); while(Date.now() - startTime < 10000) { doStuff(); }
No comments:
Post a Comment