Akinori Hashimoto / myTimer

Dependents:   DetectFreqAboveTH RN41

Revision:
1:685c0f37a569
Parent:
0:04c9087b9ca9
Child:
2:3060a6604f13
--- a/myTimer.cpp	Wed Sep 02 04:35:03 2015 +0000
+++ b/myTimer.cpp	Sun Sep 27 11:44:47 2015 +0000
@@ -40,4 +40,13 @@
         this->start();
     
     return ans;
+}
+
+void myTimer::wait_ms(int waitTime, bool _START, bool _RESET, bool _STOP)
+{
+    int wt= waitTime- this->read_ms(_START, _RESET, _STOP);
+    if(wt <= 0)
+        return;
+    wait_ms(wt);
+    return;
 }
\ No newline at end of file