30 #ifndef __SFTOOLS_BASE_CHRONOMETER_HPP__
31 #define __SFTOOLS_BASE_CHRONOMETER_HPP__
33 #include <SFML/System/Clock.hpp>
65 sf::Time
add(sf::Time time)
69 if (m_state == STOPPED) m_state = PAUSED;
80 sf::Time
reset(
bool start =
false)
84 m_time = sf::Time::Zero;
104 m_time += m_clock.getElapsedTime();
152 return m_state == RUNNING;
164 return sf::Time::Zero;
167 return m_time + m_clock.getElapsedTime();
181 operator sf::Time()
const
187 enum { STOPPED, RUNNING, PAUSED } m_state;
194 #endif // __SFTOOLS_BASE_CHRONOMETER_HPP__