Voxellancer  0.3
A game about voxels in space
 All Classes Functions Pages
timedtask.h
1 #pragma once
2 
3 #include <chrono>
4 
5 
6 class TimedTask
7 {
8 public:
9  TimedTask(std::chrono::duration<float> intervalSecs);
10  virtual ~TimedTask();
11 
12  std::chrono::duration<float> intervalSecs() const;
13  void setIntervalSecs(std::chrono::duration<float> intervalSecs);
14 
15  virtual bool isDue() const final;
16 
17  virtual void nudge() final;
18 
19  virtual void exec();
20 
21 
22 protected:
23  std::chrono::duration<float> m_intervalSecs;
24  std::chrono::high_resolution_clock::time_point m_lastExecution;
25 };
26 
Definition: timedtask.h:6