Limit frame-time to 1 millisecond

Hi. I’m working on a scene in Babylon, wich is currently running on 50 FPS/17 milliseconds and I’m happy with that. But I need somehow to implement a feature wich will limit the maximum allowed frame-time to 1 millisecond (such that powerfull computers would never switch to something above that value). Is it possible at all?

Hey @pepeskins! Welcome aboard!

This could help you how to achieve precise timing of your scene:

Request animation frame runs at the device refresh rate, which is pretty ideal. Settimeout has a minimum of 4ms, so even if u set it to 0, it will be 4, which is 250 fps. 1ms is harder to do efficiently, the best option i think is to use the audio api to get a hardware based timer if its really that important.

Hello @pepeskins just checking in, was your question answered? :slight_smile: