31 set(delay_milliseconds);
40 void set(
unsigned int delay_milliseconds)
42 ticks = (
unsigned long)(AUDIO_TICKS_PER_MILLISECOND*delay_milliseconds);
61 void start(
unsigned int delay_milliseconds)
63 set(delay_milliseconds);
81 unsigned long deadline;
85 const float AUDIO_TICKS_PER_MILLISECOND;
A non-blocking replacement for Arduino's delay() function.
void start(unsigned int delay_milliseconds)
Set the delay time and start the delay.
bool ready()
Call this in updateControl() or updateAudio() to check if the delay time is up.
void set(unsigned int delay_milliseconds)
Set the delay time.
void start()
Start the delay.
EventDelay(unsigned int delay_milliseconds=0)
Constructor.
#define MOZZI_AUDIO_RATE
Defines the audio rate, i.e.
unsigned long audioTicks()
An alternative for Arduino time functions like micros() and millis().