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:
- 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;
}