SFML community forums

General => Feature requests => Topic started by: aisman on April 20, 2008, 12:03:22 am

Title: sf::Clock Class: Time elapsed, in milliseconds please
Post by: aisman on April 20, 2008, 12:03:22 am
A additional faster Time elapse will be usefull.
Title: sf::Clock Class: Time elapsed, in milliseconds please
Post by: Laurent on April 20, 2008, 07:27:07 am
Sorry, I don't understand. What do you want exactly ?
Title: sf::Clock Class: Time elapsed, in milliseconds please
Post by: aisman on April 20, 2008, 08:06:47 am
That is what I found in the online help:

The return is Time elased, in seconds (Seconds is maybe not fine enough).

Code: [Select]
float sf::Clock::GetElapsedTime  (   )  const
Get the time elapsed since last reset.

Returns:
Time elapsed, in seconds
Title: sf::Clock Class: Time elapsed, in milliseconds please
Post by: Laurent on April 20, 2008, 08:23:35 am
I still don't understand, sorry :|
Title: sf::Clock Class: Time elapsed, in milliseconds please
Post by: aisman on April 20, 2008, 08:49:05 am
Quote from: "Laurent"
I still don't understand, sorry :|

Oh dear, ;-)

It returns the elapsed time in seconds. I think milliseconds will be also a  good idea.

However.
I can work with it.  Not so important for me at the moment´.
Title: sf::Clock Class: Time elapsed, in milliseconds please
Post by: Laurent on April 20, 2008, 08:55:13 am
It returns a float, not an integer. If you want milliseconds just multiply by 1000.
Title: sf::Clock Class: Time elapsed, in milliseconds please
Post by: aisman on April 20, 2008, 08:56:41 am
Quote from: "Laurent"
It returns a float, not an integer. If you want milliseconds just multiply by 1000.

Ok.

But an (internal) work with integer will be faster?
Title: sf::Clock Class: Time elapsed, in milliseconds please
Post by: Laurent on April 20, 2008, 11:06:11 am
No.