What is the equivalent of window.GetFrameTime in SFML 2.1?
I think it's from SFML 1.6 or SFML 2.0.
How can I use it in SFMl 2.1 on c++?
GetFrameTime() was removed from SFML at the beginning of 2012. The reasoning for it can be found here: http://en.sfml-dev.org/forums/index.php?topic=6831.0
Users have to create an sf::Clock object now and keep time themselves. This has more advantages than disadvantages including:
GetFrameTime() reported the time spent during the last frame)The new way of measuring the update time is 100% accurate (also thanks to the new sf::Clock::Restart function)
Code:
sf::Clock clock;
...
Update(clock.Restart());
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With