Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: DetectFreqAboveTH RN41
Diff: myTimer.cpp
- 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