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:
- 6:4cb4eea64805
- Parent:
- 5:c9304777ce1a
diff -r c9304777ce1a -r 4cb4eea64805 myTimer.cpp --- a/myTimer.cpp Tue Mar 29 10:50:26 2016 +0000 +++ b/myTimer.cpp Fri Sep 29 06:46:31 2017 +0000 @@ -69,4 +69,14 @@ if(_RESET) this->reset(); return; +} +void myTimer::wait_us(int waitTime, bool _START, bool _RESET, bool _STOP) +{ + int wt= waitTime- this->read_us(_START, _RESET, _STOP); + if(wt <= 0) + return; + ::wait_us(wt); + if(_RESET) + this->reset(); + return; } \ No newline at end of file