chore: Add course material

This commit is contained in:
2026-10-05 11:27:21 +02:00
parent 971813c351
commit e8241fd1ff
660 changed files with 26658 additions and 1 deletions
+33
View File
@@ -0,0 +1,33 @@
// ======================================================
//
// A general-purpose countdown timer
// To use this class, specialize it
// and override tick()
//
// ======================================================
#ifndef timer_H
#define timer_H
#include <ctime>
#include <functional>
class Timer {
public:
Timer(std::function<void(void)> action);
void timeoutRequest(int seconds);
// template method
void tick();
protected:
bool isExpired();
private:
std::function<void(void)> doExpired;
int timeToGo;
};
#endif