Timer for accumulating 10 ms intervals that does not overflow after ~30 min
This class simply creates a timer that accumulates 10 millisecond intervals which does not overflow after about 30 min.
Diff: RunTimer.cpp
- Revision:
- 2:67e16d628edc
- Parent:
- 1:134292d456c9
- Child:
- 3:9efa965d2111
--- a/RunTimer.cpp Thu May 19 13:39:12 2016 +0000 +++ b/RunTimer.cpp Thu May 19 16:45:31 2016 +0000 @@ -5,7 +5,7 @@ this->sec =0; this->min = 0; this->hour = 0; - this->days = 0; + this->day = 0; this->timer_10ms.attach(this, &RunTimer::timeAcc, .01); } @@ -23,7 +23,7 @@ this->hour++; if(this->hour==24){ this->hour=0; - days++; + day++; } } } @@ -35,5 +35,5 @@ this->sec =0; this->min = 0; this->hour = 0; - this->days = 0; + this->day = 0; } \ No newline at end of file