From 7863e4caa1d07aef348a437fe0a662db68fd7ac3 Mon Sep 17 00:00:00 2001 From: Aki Date: Sat, 21 May 2022 11:55:08 +0200 Subject: Added naive Timeline --- Timeline.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Timeline.h (limited to 'Timeline.h') diff --git a/Timeline.h b/Timeline.h new file mode 100644 index 0000000..515d2d3 --- /dev/null +++ b/Timeline.h @@ -0,0 +1,18 @@ +#pragma once + +#include + + +class Timeline +{ +public: + Timeline(std::time_t start, std::time_t end); + std::time_t timestamp() const; + double current() const; + double progress() const; + double move(double dt); +private: + const std::time_t m_start; + const double m_end; + double m_current; +}; -- cgit v1.1