Torc  0.1
torctimer.cpp
Go to the documentation of this file.
1 #include "torctimer.h"
2 
4  : m_timer(),
5  m_running(false)
6 {
7 }
8 
9 void TorcTimer::Start(void)
10 {
11  m_running = true;
12  m_timer.start();
13 }
14 
16 {
17  int ret = Elapsed();
18  m_timer.restart();
19  return ret;
20 }
21 
23 {
24  int ret = m_timer.elapsed();
25  if (ret > 86300000)
26  {
27  ret = 0;
28  m_timer.restart();
29  }
30  return ret;
31 }
32 
33 void TorcTimer::Stop(void)
34 {
35  m_running = false;
36 }
37 
38 bool TorcTimer::IsRunning(void) const
39 {
40  return m_running;
41 }
void Stop(void)
Definition: torctimer.cpp:33
void Start(void)
Definition: torctimer.cpp:9
bool IsRunning(void) const
Definition: torctimer.cpp:38
int Restart(void)
Definition: torctimer.cpp:15
int Elapsed(void)
Definition: torctimer.cpp:22