void Activity::Pause() { if (m_isPaused) m_secsSpentPaused += CurrentTimeInSeconds() - m_timeWhenPaused; else m_timeWhenPaused = CurrentTimeInSeconds(); m_isPaused = !m_isPaused; }
bool CalcTime(int * times, double * start) { if(*times == 0) { *start = CurrentTimeInSeconds(); } else { double elapsed = CurrentTimeInSeconds() - *start; if(elapsed > 0.1f && *times >= 3) { *start = elapsed / *times; return false; } } (*times)++; return true; }
bool Activity::Start() { if (m_startTimeSecs == 0) { SetStartTimeSecs(CurrentTimeInSeconds()); return true; } return false; }