|
HoloLib
High-performance holonomic (X-Drive) control library for VEX V5
|
#include <Timer.hpp>
Public Member Functions | |
| Timer (uint32_t time) | |
| Construct a new Timer. | |
| uint32_t | getTimeSet () |
| Get the amount of time the timer was set to. | |
| uint32_t | getTimeLeft () |
| Get the amount of time left on the timer. | |
| uint32_t | getTimePassed () |
| Get the amount of time passed on the timer. | |
| bool | isDone () |
| Get whether the timer is done or not. | |
| bool | isPaused () |
| Get whether the timer is paused or not. | |
| void | set (uint32_t time) |
| Set the amount of time the timer should count down. | |
| void | reset () |
| reset the timer | |
| void | pause () |
| pause the timer | |
| void | resume () |
| resume the timer | |
| void | waitUntilDone () |
| wait until the timer is done | |
| hololib::Timer::Timer | ( | uint32_t | time | ) |
Construct a new Timer.
| time | how long to wait |
Example
| uint32_t hololib::Timer::getTimeSet | ( | ) |
Get the amount of time the timer was set to.
Example
| uint32_t hololib::Timer::getTimeLeft | ( | ) |
Get the amount of time left on the timer.
Example
| uint32_t hololib::Timer::getTimePassed | ( | ) |
Get the amount of time passed on the timer.
Example
| bool hololib::Timer::isDone | ( | ) |
Get whether the timer is done or not.
Example
| bool hololib::Timer::isPaused | ( | ) |
Get whether the timer is paused or not.
Example
| void hololib::Timer::set | ( | uint32_t | time | ) |
Set the amount of time the timer should count down.
Resets the timer
| time | time in milliseconds |
Example
| void hololib::Timer::reset | ( | ) |
reset the timer
Example
| void hololib::Timer::pause | ( | ) |
pause the timer
Example
| void hololib::Timer::resume | ( | ) |
resume the timer
Example
| void hololib::Timer::waitUntilDone | ( | ) |
wait until the timer is done
Example