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

Author Topic: timeGetTime() replacement?  (Read 5775 times)

0 Members and 1 Guest are viewing this topic.

scorcher24

  • Newbie
  • *
  • Posts: 9
    • ICQ Messenger - 78951707
    • View Profile
timeGetTime() replacement?
« on: March 29, 2011, 02:03:04 pm »
Is there any function in SFML that returns the same values than timeGetTime()?
The miliseconds which have passed since application start?
sf::Clock() does not work very well with my existing code. I have borked animations. They are either damn slow or I have very sudden movement. With timeGetTime() everythings okay.
For explanation:
I used SDL_GetTicks() before. But I wanted to replace SDL with SFML since it comes with Network and better Audio.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
timeGetTime() replacement?
« Reply #1 on: March 29, 2011, 02:06:45 pm »
sf::Clock is the time class, there's nothing else. Please give more details about your problem so that we can fix it (either in your code or in SFML).
Laurent Gomila - SFML developer

devlin

  • Full Member
  • ***
  • Posts: 128
    • View Profile
timeGetTime() replacement?
« Reply #2 on: March 29, 2011, 05:58:07 pm »
Quote from: "Laurent"
sf::Clock is the time class, there's nothing else. Please give more details about your problem so that we can fix it (either in your code or in SFML).

There's also the window function to get time since last frame?

float sf::Window::GetFrameTime()

Lo-X

  • Hero Member
  • *****
  • Posts: 618
    • View Profile
    • My personal website, with CV, portfolio and projects
timeGetTime() replacement?
« Reply #3 on: March 29, 2011, 06:03:44 pm »
Quote from: "devlin"

There's also the window function to get time since last frame?

float sf::Window::GetFrameTime()


I think I work on a sf::Clock too, tell me if I'm wrong.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
timeGetTime() replacement?
« Reply #4 on: March 29, 2011, 06:06:20 pm »
Everything works with a sf::Clock. Why would there be different ways to get time? ;)
Laurent Gomila - SFML developer