]> git.tdb.fi Git - r2c2.git/blob - source/libr2c2/clock.h
Display the current time in the main window
[r2c2.git] / source / libr2c2 / clock.h
1 #ifndef LIBR2C2_CLOCK_H_
2 #define LIBR2C2_CLOCK_H_
3
4 #include <sigc++/signal.h>
5 #include <msp/time/timedelta.h>
6
7 namespace R2C2 {
8
9 class Clock
10 {
11 public:
12         sigc::signal<void> signal_minute;
13
14 private:
15         Msp::Time::TimeDelta current_time;
16         float rate;
17
18 public:
19         Clock();
20
21         void set_rate(float);
22         const Msp::Time::TimeDelta &get_current_time() const { return current_time; }
23         void tick(const Msp::Time::TimeDelta &);
24 };
25
26 } // namespace R2C2
27
28 #endif