It seems that everybody wants different things:
- nanoseconds, microseconds, milliseconds, seconds
- float, double, Uint32, Uint64
The most flexible approach would be to implement sf::Clock using a Uint64 number of nanoseconds. This is indeed possible on supported OSes; I can even improve the implementation to use only monotonic and non-overflowing functions.
But then I still have to decide what to provide in the public API. I have several solutions, but none of them would satisfy everyone:
- provide Uint64 nanoseconds, but then many people will complain that we're losing the S of SFML
- provide Uint32 milliseconds, but then some people will complain that the resolution is too high
- provide double seconds, but then some people will complain about the lack of exact timestamps, as well as the need to cast to float every calculation involving time (everything gets promoted to double when one of the operands is a double, but SFML uses float everywhere else)
- provide everything, but then I will complain about the bloated API
If someone can find a clean solution to this problem I'm ready to rewrite sf::Clock again if necessary.