diff options
author | Aki <please@ignore.pl> | 2022-05-21 11:55:08 +0200 |
---|---|---|
committer | Aki <please@ignore.pl> | 2022-05-21 11:55:08 +0200 |
commit | 7863e4caa1d07aef348a437fe0a662db68fd7ac3 (patch) | |
tree | bf52dfa7a7c45be1d1a696f5bf7c0c3f90beba68 /Timeline.h | |
parent | de8d7a812c4da9f0375dc47626c0e836ba728207 (diff) | |
download | derelict-7863e4caa1d07aef348a437fe0a662db68fd7ac3.zip derelict-7863e4caa1d07aef348a437fe0a662db68fd7ac3.tar.gz derelict-7863e4caa1d07aef348a437fe0a662db68fd7ac3.tar.bz2 |
Added naive Timeline
Diffstat (limited to 'Timeline.h')
-rw-r--r-- | Timeline.h | 18 |
1 files changed, 18 insertions, 0 deletions
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 <ctime> + + +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; +}; |