1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-10-02 15:43:16 +03:00
gmenu2x/src/clock.h
2013-07-21 23:54:09 -04:00

29 lines
437 B
C++

#ifndef __CLOCK_H__
#define __CLOCK_H__
#include <string>
#include <SDL.h>
class Clock {
public:
static Clock *getInstance();
~Clock();
std::string &getTime(bool is24 = true);
static bool isRunning();
void resetTimer();
private:
Clock();
void addTimer(int timeout);
int update();
static Clock *instance;
SDL_TimerID timer;
unsigned int timeout_startms;
int minutes, hours;
std::string str;
};
#endif /* __CLOCK_H__ */