holiday-lights/pulse.h

19 lines
397 B
C
Raw Permalink Normal View History

#pragma once
#include "durations.h"
class Pulse {
public:
Pulse(unsigned long period);
/** Ticked tells you if a period has elapsed. */
bool Ticked();
2020-12-19 16:46:43 -07:00
bool Ticked(unsigned long now);
/** Until sets the duration of the next period. */
void Until(unsigned long next);
void Until(unsigned long next, unsigned long now);
unsigned long period;
unsigned long nextEventMillis;
};