Download this file
#include "timer.h"

bool Timer::canRun(uint32_t now) {
  return enabled && (int32_t) (runTime - millis()) < 0;
}

void WakeupTimer::run(uint32_t now) {
  state_machine->wakeup();
}

void ResetTimer::run(uint32_t now) {
#ifdef ENABLE_RESET
  state_machine->reset();
#endif
}