SFML community forums

Help => Window => Topic started by: aNewHobby on June 05, 2012, 09:37:33 am

Title: [SOLVED] - Measuring Time in SFML2
Post by: aNewHobby on June 05, 2012, 09:37:33 am
I can not work out how to measure time in SFML2.. the tutorials 1.6 seam depreciated. I have searched but all i see is a lot of people asking the question and a few solutions that are embedded in complex code.

Any ideas how to re-write in sfml2?

sf::Clock Clock;

while (App.IsOpened())
{
    float Framerate = 1.f / Clock.GetElapsedTime();
    Clock.Reset();
}

// Or :

while (App.IsOpened())
{
    float Framerate = 1.f / App.GetFrameTime();
}

Title: Re: Mesuring Time in SFML2
Post by: Laurent on June 05, 2012, 09:39:21 am
Quote
the tutorials 1.6 seam depreciated
So look at the 2.0 tutorials ;)
Title: Re: Mesuring Time in SFML2
Post by: aNewHobby on June 05, 2012, 11:53:40 am
Quote
the tutorials 1.6 seam depreciated
So look at the 2.0 tutorials ;)

lol.. I swear I looked at them like a few days ago :).. thanks L-man! Can not wait for the rest.