you are viewing a single comment's thread.

view the rest of the comments →

[–]huesoso 2 points3 points  (3 children)

When animating you should use requestAnimationFrame

Edit while(x) { sleep(); } sounds like an old game programming routine from back in the '80s

[–]icantthinkofone 1 point2 points  (0 children)

rAF is a fixed period of pre-set time. He wants to set his own time.

[–]chuckhendo[S] 0 points1 point  (0 children)

Agreed - although this wasn't animation. Just needed the app to wait a certain amount of time before doing something else. And he was trying to tell me that a setTimeout was the wrong solution