namespace R2C2 {
Clock::Clock():
- rate(1)
+ rate(1),
+ stopped(false)
{ }
void Clock::set_rate(float s)
current_time = t;
}
+void Clock::stop(bool s)
+{
+ stopped = s;
+}
+
void Clock::tick(const Time::TimeDelta &dt)
{
+ if(stopped)
+ return;
+
unsigned prev_minute = current_time/Time::min;
current_time += dt*rate;
if(current_time>=Time::day)