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

29 lines
426 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:
Clock();
2013-07-22 06:54:09 +03:00
~Clock();
std::string getTime(bool is24 = true);
class Forwarder;
friend Forwarder;
2013-07-22 06:54:09 +03:00
private:
void addTimer(int timeout);
void resetTimer();
2013-07-22 06:54:09 +03:00
int update();
unsigned int clockCallback(unsigned int timeout);
2013-07-22 06:54:09 +03:00
SDL_TimerID timer;
unsigned int timeout_startms;
int minutes, hours;
};
#endif /* __CLOCK_H__ */