-typedef struct {
- float frequency;
- unsigned long lastTick;
- TimeFunction timeFunction;
-} FrequencyClock;
\ No newline at end of file
+class frequency_clock_t
+{
+private:
+ float frequency_;
+ unsigned long last_tick_;
+ time_function_t time_function_;
+
+public:
+ frequency_clock_t();
+ frequency_clock_t(float frequency);
+ frequency_clock_t(float frequency, unsigned long last_tick, time_function_t time_function);
+
+ float get_frequency() const;
+ static float frequency_to_period(float frequency);
+ bool started();
+ time_function_t get_time_function();
+ bool elapsed(bool stagger);
+
+ void tick();
+};
\ No newline at end of file