1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-07-02 18:32:20 +03:00
gmenu2x/src/clock.h

29 lines
437 B
C
Raw Normal View History

2013-07-22 06:54:09 +03:00
#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__ */