Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: [SOLVED] - Measuring Time in SFML2  (Read 2650 times)

0 Members and 1 Guest are viewing this topic.

aNewHobby

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
    • Live 4 Ever Or Die Trying
[SOLVED] - Measuring Time in SFML2
« 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();
}

« Last Edit: June 05, 2012, 11:54:03 am by aNewHobby »
Twitter: @Jyinkies
My Own Little Spot on the Net: - Live4everOrDieTrying.info (Blog)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Mesuring Time in SFML2
« Reply #1 on: June 05, 2012, 09:39:21 am »
Quote
the tutorials 1.6 seam depreciated
So look at the 2.0 tutorials ;)
Laurent Gomila - SFML developer

aNewHobby

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
    • Live 4 Ever Or Die Trying
Re: Mesuring Time in SFML2
« Reply #2 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.
Twitter: @Jyinkies
My Own Little Spot on the Net: - Live4everOrDieTrying.info (Blog)