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.

Files at this revision

API Documentation at this revision

Comitter:
jebradshaw
Date:
Mon Jul 11 18:26:47 2016 +0000
Parent:
2:67e16d628edc
Commit message:
20160711;

Changed in this revision

RunTimer.cpp Show annotated file Show diff for this revision Revisions of this file
RunTimer.h Show annotated file Show diff for this revision Revisions of this file
--- a/RunTimer.cpp	Thu May 19 16:45:31 2016 +0000
+++ b/RunTimer.cpp	Mon Jul 11 18:26:47 2016 +0000
@@ -11,6 +11,7 @@
 }
 
 void RunTimer::timeAcc(void){
+    ms_total += 10.0;
     this->ms +=10;
     if(this->ms == 1000){
         this->ms = 0;
--- a/RunTimer.h	Thu May 19 16:45:31 2016 +0000
+++ b/RunTimer.h	Mon Jul 11 18:26:47 2016 +0000
@@ -33,6 +33,7 @@
     
     Ticker timer_10ms;          //Ticker for adding 10ms
     
+    float ms_total;
     unsigned int ms;
     unsigned int sec;
     unsigned int min;