]> git.tdb.fi Git - r2c2.git/blob - source/libr2c2/clock.cpp
5f87c44a90d6f38cc78c29e3377f91f2af798ce7
[r2c2.git] / source / libr2c2 / clock.cpp
1 #include "clock.h"
2
3 using namespace Msp;
4
5 namespace R2C2 {
6
7 Clock::Clock():
8         rate(1)
9 { }
10
11 void Clock::set_rate(float s)
12 {
13         rate = s;
14 }
15
16 void Clock::tick(const Time::TimeDelta &dt)
17 {
18         current_time += dt*rate;
19 }
20
21 } // namespace R2C2