I need a simple clock to run in the background while the game is progressing.
I have the choice of using :
JavaScript's
requestAnimationFrame() in conjunction with either :
-
UtSystem.getUserTimeMSec() or
- JavaScript's
Date().
I would like to ask: which is more efficient?
Thank you in advance
Comments
FPS control in requestAnimationFrame I think difficult .
I think that JavaScript's Date () or SetTimeout () is good .