Get deltaTime from UserView/Window

hello, i started to program some small interactive programs in SC. my question, is it possible to retrieve deltaTime from an animated UserView, like in a typical game update loop? i want to seperate my update code in a Routine instead of running all this inside the animated UserView. currently i set dt fixed to framerate.reciprocal (ie. 1/60) but this doesn’t seem the right way. if i try to do UserView.framerate.reciprocal strange stuff happens… thanks!

Maybe you can get the delta by calculating the difference between SystemClock.seconds in the current and previous frame?

@jpburstrom thanks. i quickly implemented this, i don’t have time atm to test accuracy but it seems to do the trick!