SFML community forums

General => Feature requests => Topic started by: Edoren on April 13, 2014, 02:09:51 am

Title: sf::Clock start() and stop() functions
Post by: Edoren on April 13, 2014, 02:09:51 am
Hi  :),
I think that it will be really useful if you can stop and start the sf::Clock, I have implemented what I say https://github.com/edoren/SFML/commit/bbf03755be1d041aaffac01f4eca873d173bf359 (https://github.com/edoren/SFML/commit/bbf03755be1d041aaffac01f4eca873d173bf359), just tell me to make a pull request :D. So, what do you think guys?.
Title: Re: sf::Clock start() and stop() functions
Post by: Mario on April 13, 2014, 08:44:08 am
Added comments to the commit. I'd think again about the names for those members. :)
Title: Re: sf::Clock start() and stop() functions
Post by: Laurent on April 13, 2014, 10:28:49 am
This has already been discussed before.

It's implemented in the Thor library if you want ;)
Title: Re: sf::Clock start() and stop() functions
Post by: Nexus on April 13, 2014, 10:40:32 am
See here (http://www.bromeon.ch/libraries/thor/v2.0/doc/group___time.html) for more information :)
Title: Re: sf::Clock start() and stop() functions
Post by: Edoren on April 15, 2014, 02:33:54 am
This has already been discussed before.
Where?, I searched before posting and I couldn't find any related post, sorry if it's duplicated :-\.

It's implemented in the Thor library if you want ;)
Yes, but it will be more useful if we can do this without using any external library, I think SFML can provide this functionality without problem.

I think I have to change the names, start() to resume() and stop() to pause(), as Mario said those current names are a little confusing.
Title: Re: sf::Clock start() and stop() functions
Post by: Rosme on April 15, 2014, 04:53:14 pm
Nothing prevents you from making this and putting it in the wiki. It's not a complicated thing, and in any case, Thor provides this. It is after all an SFML extension.