Simple 64-bit timer for mbed. It is a drastically simplified version of Timer64 class by Tom Doyle. It is meant to be used in single-thread applications, where timer is used frequently, while standard 32-bit Timer is not enough.
Fork of Timer64 by
Diff: Timer64.cpp
- Revision:
- 6:100cf27b43aa
- Parent:
- 3:8396d3e6eb62
--- a/Timer64.cpp Mon Mar 28 16:31:42 2016 +0000 +++ b/Timer64.cpp Fri Apr 01 16:26:49 2016 +0000 @@ -244,6 +244,26 @@ return(status); } +int Timer64::isRunning(bool* running) +{ + int status = TIMER64_OK; + + _sem->wait(); + { + if (!_timerInitialized) + { + status = TIMER64_ERROR_NOT_INITIALIZED; + } + else + { + *running = _timerRunning; + } + } + _sem->release(); + + return(status); +} + void Timer64::_rollOverCheck(void const* args) { Timer64* timer = (Timer64*)args;