data drivin all code sucess
This commit is contained in:
@@ -4,10 +4,11 @@
|
||||
#include <ctime>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "data.hpp"
|
||||
|
||||
class Timer {
|
||||
public:
|
||||
Timer(std::string name, float max_time) : name(name), max_time(max_time) {};
|
||||
Timer(TimerData data) : name(data.name), max_time(data.max_time) {};
|
||||
bool below_or_zero();
|
||||
float get_time();
|
||||
std::string get_name();
|
||||
@@ -21,8 +22,11 @@ private:
|
||||
};
|
||||
|
||||
struct Scheduler {
|
||||
Scheduler();
|
||||
std::vector<Timer> timers;
|
||||
void update(bool& running, std::vector<Timer>& times);
|
||||
int pull(std::vector<Timer>& times, std::string name);
|
||||
void update(bool& running);
|
||||
int pull(std::string name);
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user