mbed-drivers
|
#include <Timer.h>
Public Member Functions | |
Timer (const ticker_data_t *const data) | |
void | start () |
void | stop () |
void | reset () |
float | read () |
int | read_ms () |
int | read_us () |
operator float () | |
Protected Member Functions | |
int | slicetime () |
Protected Attributes | |
int | _running |
unsigned int | _start |
int | _time |
const ticker_data_t *const | _ticker_data |
A general purpose timer
Example:
float mbed::Timer::read | ( | ) |
Get the time passed in seconds
int mbed::Timer::read_ms | ( | ) |
Get the time passed in mili-seconds
int mbed::Timer::read_us | ( | ) |
Get the time passed in micro-seconds
void mbed::Timer::reset | ( | ) |
Reset the timer to 0.
If it was already counting, it will continue
void mbed::Timer::start | ( | void | ) |
Start the timer
void mbed::Timer::stop | ( | void | ) |
Stop the timer