void Timer::Tick() { std::this_thread::sleep_for( std::chrono::milliseconds( m_interval ) ); if ( m_isRunning ) { m_tick( this, Timing::GetTimeMillis() - m_interval ); } }
Timer::~Timer() { do { m_tick(); this_thread::sleep_for (chrono::seconds(1)); } while(m_startState); }