SFML community forums
Help => General => Topic started by: bglaze on November 03, 2011, 11:29:32 am
-
I was taught that when programming, Time is is typically stored using an integer that represents milliseconds. However, I see that SFML uses floats to represent Time.
Should all of my sub-times that get assigned by and then compared to ElapsedTime() be floats? If I have them as as integers, will SFML have to convert them, thus using more (though I'm sure only slightly) processor power?
Or was I simply taught wrong, and using floats is actually the norm?
Thanks!!
-
SFML 2.0 uses unsigned int.
You should not care for processor power which is needed to convert between float and (unsigned) int, it won't have a noticeable effect.
-
Thank you, P@u1!
-
Since it's been mentioned, can anyone tell me why was time changed from float to integer milliseconds? If I ever wanted an integer, I could always round the value. Why is it rounded for me?
-
There's a thread for this modification:
http://www.sfml-dev.org/forum/viewtopic.php?t=4864