]> git.localhorst.tv Git - blank.git/blobdiff - src/app/IntervalTimer.hpp
some experiements with state sync
[blank.git] / src / app / IntervalTimer.hpp
index 06caa5e21b9bb5c805a1f2e73d68d89c855f8996..5240f5d3f60a419e8593b5e883dab9fd5c8e8d1c 100644 (file)
@@ -40,9 +40,15 @@ public:
        int Elapsed() const noexcept {
                return value;
        }
+       int Interval() const noexcept {
+               return intv;
+       }
        int Iteration() const noexcept {
                return value / intv;
        }
+       void PopIteration() noexcept {
+               value -= intv;
+       }
 
        void Update(int dt) noexcept {
                value += dt * speed;