nsnake
Classic snake game for the terminal
|
1 #ifndef TIMER_H_DEFINED
2 #define TIMER_H_DEFINED
39 suseconds_t startMark;
41 suseconds_t pausedMark;
bool isRunning()
Tells if the timer's still running (hasn't called stop())
void start()
Sets a starting point for the timer.
bool isPaused()
Tells if the timer's paused.
suseconds_t delta_s()
Returns the seconds part of the timer's difference.
suseconds_t delta_ms()
Returns the milisseconds part of the timer's difference.
void unpause()
Restarts the timer if it was paused.
suseconds_t delta_us()
Returns the whole timer's difference in milisseconds.
void pause()
Temporarily stops the timer.