示例#1
0
文件: Activity.cpp 项目: msimms/Exert
void Activity::Pause()
{
	if (m_isPaused)
		m_secsSpentPaused += CurrentTimeInSeconds() - m_timeWhenPaused;
	else
		m_timeWhenPaused = CurrentTimeInSeconds();
	m_isPaused = !m_isPaused;
}
示例#2
0
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;
}
示例#3
0
文件: Activity.cpp 项目: msimms/Exert
bool Activity::Start()
{
	if (m_startTimeSecs == 0)
	{
		SetStartTimeSecs(CurrentTimeInSeconds());
		return true;
	}
	return false;
}