Timer basado en la cuenta de SDL. Más...
#include <sdl_timer.h>
Métodos públicos | |
SDLTimer () | |
Crea un objeto SDLTimer. Más... | |
SDLTimer (const SDLTimer &other) | |
Crea un objeto SDLTimer por copia. Más... | |
SDLTimer & | operator= (const SDLTimer &other) |
SDLTimer (SDLTimer &&other) | |
SDLTimer & | operator= (SDLTimer &&other) |
void | start () |
Inicia la cuenta del timer. Más... | |
void | stop () |
Detiene la cuenta del timer. Más... | |
void | pause () |
Pausa la cuenta del timer. Más... | |
void | unpause () |
Despausa la cuenta del timer. Más... | |
uint32_t | get_ticks () const |
Devuelve el tiempo transcurrido desde que se inicio el timer. Más... | |
bool | is_started () const |
Indica si el timer esta iniciado. Más... | |
bool | is_paused () const |
Indica si el timer esta pausado. Más... | |
Timer basado en la cuenta de SDL.
SDLTimer::SDLTimer | ( | ) |
Crea un objeto SDLTimer.
Permite medir el paso del tiempo en la ejecucion del programa.
SDLTimer::SDLTimer | ( | const SDLTimer & | other | ) |
Crea un objeto SDLTimer por copia.
other | Otro timer. |
uint32_t SDLTimer::get_ticks | ( | ) | const |
Devuelve el tiempo transcurrido desde que se inicio el timer.
bool SDLTimer::is_paused | ( | ) | const |
Indica si el timer esta pausado.
bool SDLTimer::is_started | ( | ) | const |
Indica si el timer esta iniciado.
void SDLTimer::pause | ( | ) |
Pausa la cuenta del timer.
void SDLTimer::start | ( | ) |
Inicia la cuenta del timer.
void SDLTimer::stop | ( | ) |
Detiene la cuenta del timer.
void SDLTimer::unpause | ( | ) |
Despausa la cuenta del timer.