|
nsnake
Classic snake game for the terminal
|
Public Member Functions | |
| void | start () |
| Sets a starting point for the timer. | |
| void | pause () |
| Temporarily stops the timer. | |
| void | unpause () |
| Restarts the timer if it was paused. | |
| bool | isRunning () |
| Tells if the timer's still running (hasn't called stop()). | |
| bool | isPaused () |
| Tells if the timer's paused. | |
| suseconds_t | delta_us () |
| Returns the whole timer's difference in milisseconds. | |
| suseconds_t | delta_ms () |
| Returns the milisseconds part of the timer's difference. | |
| suseconds_t | delta_s () |
| Returns the seconds part of the timer's difference. | |
Protected Attributes | |
| suseconds_t | startMark |
| suseconds_t | stopMark |
| suseconds_t | pausedMark |
| bool | running |
| bool | paused |
| suseconds_t Timer::delta_ms | ( | ) |
| suseconds_t Timer::delta_s | ( | ) |
| suseconds_t Timer::delta_us | ( | ) |
| bool Timer::isRunning | ( | ) |
| void Timer::start | ( | ) |
| void Timer::unpause | ( | ) |