Utility class for manipulating time. More...
#include <Clock.hpp>
Public Member Functions | |
Clock () | |
Default constructor. | |
float | GetElapsedTime () const |
Get the time elapsed. | |
void | Reset () |
Restart the timer. |
Utility class for manipulating time.
sf::Clock is a lightweight class for measuring time.
Its accuray depends on the underlying OS, but you can generally expect a 1 ms precision.
Usage example:
sf::Clock clock; ... float time1 = clock.GetElapsedTime(); clock.Reset(); ... float time2 = clock.GetElapsedTime();
Definition at line 40 of file Clock.hpp.
sf::Clock::Clock | ( | ) |
float sf::Clock::GetElapsedTime | ( | ) | const |
void sf::Clock::Reset | ( | ) |