Akinori Hashimoto / myTimer

Dependents:   DetectFreqAboveTH RN41

Revision:
2:3060a6604f13
Parent:
1:685c0f37a569
Child:
3:de4737751df6
--- a/myTimer.cpp	Sun Sep 27 11:44:47 2015 +0000
+++ b/myTimer.cpp	Tue Oct 06 06:53:16 2015 +0000
@@ -19,8 +19,10 @@
     return;
 }
 
-void myTimer::start()
+void myTimer::start(bool _RESET)
 {
+    if(_RESET)
+        this->reset();
     this->timer.start();
     return;
 }
@@ -30,15 +32,15 @@
     int ans= 0;
     if(_STOP)
         this->stop();
-    
+
     ans= this->timer.read_ms();
-        
+
     if(_RESET)
         this->reset();
-        
+
     if(_START)
         this->start();
-    
+
     return ans;
 }