12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
-
- #ifndef MBED_TIMER_H
- #define MBED_TIMER_H
-
- #include "platform.h"
- #include "ticker_api.h"
-
- namespace mbed {
-
-
- class Timer {
-
- public:
- Timer();
- Timer(const ticker_data_t *data);
-
-
-
- void start();
-
-
-
- void stop();
-
-
-
- void reset();
-
-
-
- float read();
-
-
-
- int read_ms();
-
-
-
- int read_us();
-
- #ifdef MBED_OPERATORS
- operator float();
- #endif
-
- protected:
- int slicetime();
- int _running;
- unsigned int _start;
- int _time;
- const ticker_data_t *_ticker_data;
- };
-
- }
-
- #endif
|