SFML community forums

Help => System => Topic started by: scorcher24 on March 29, 2011, 02:03:04 pm

Title: timeGetTime() replacement?
Post by: scorcher24 on March 29, 2011, 02:03:04 pm
Is there any function in SFML that returns the same values than timeGetTime() (http://msdn.microsoft.com/en-us/library/ms713418(v=vs.85).aspx)?
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.
Title: timeGetTime() replacement?
Post by: Laurent 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).
Title: timeGetTime() replacement?
Post by: devlin 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()
Title: timeGetTime() replacement?
Post by: Lo-X 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.
Title: timeGetTime() replacement?
Post by: Laurent on March 29, 2011, 06:06:20 pm
Everything works with a sf::Clock. Why would there be different ways to get time? ;)