@CreamFilling512:Well actually it's a two parter ...
1) How to suspend drawing until the next frame ... kind of like SwapBuffers() which blocks until the next refresh cycle if you system and software are configured correctly. This is roughly the approximate equivalent of requestAnimationFrame(). That is releasing the remainder of your time to Windows while waiting for the next frame.
Edit: Reading the documentation for requestAnimationFrame(), which applies only to some browsers and is not supported in IE, it would seem that the callback includes a parameter passed from the browser. The timestamp callback argument represents a number of milliseconds. This is a step in the right direction, but it's let up to the browser implementors to determine the accuracy of timestamp.