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