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:
- 5:c9304777ce1a
- Parent:
- 4:2f7a8e62597a
- Child:
- 6:4cb4eea64805
--- a/myTimer.cpp Thu Nov 05 04:02:28 2015 +0000 +++ b/myTimer.cpp Tue Mar 29 10:50:26 2016 +0000 @@ -43,6 +43,22 @@ return ans; } +int myTimer::read_us(bool _START, bool _RESET, bool _STOP) +{ + int ans= 0; + if(_STOP) + this->stop(); + + ans= this->timer.read_us(); + + if(_RESET) + this->reset(); + + if(_START) + this->start(); + + return ans; +} void myTimer::wait_ms(int waitTime, bool _START, bool _RESET, bool _STOP) {