Akinori Hashimoto / myTimer

Dependents:   DetectFreqAboveTH RN41

Revision:
0:04c9087b9ca9
Child:
1:685c0f37a569
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/myTimer.cpp	Wed Sep 02 04:35:03 2015 +0000
@@ -0,0 +1,43 @@
+#include "myTimer.h"
+
+
+myTimer::myTimer()
+{
+    this->stop();
+    this->reset();
+}
+
+void myTimer::stop()
+{
+    this->timer.stop();
+    return;
+}
+
+void myTimer::reset()
+{
+    this->timer.reset();
+    return;
+}
+
+void myTimer::start()
+{
+    this->timer.start();
+    return;
+}
+
+int myTimer::read_ms(bool _START, bool _RESET, bool _STOP)
+{
+    int ans= 0;
+    if(_STOP)
+        this->stop();
+    
+    ans= this->timer.read_ms();
+        
+    if(_RESET)
+        this->reset();
+        
+    if(_START)
+        this->start();
+    
+    return ans;
+}
\ No newline at end of file