39 void Coroutine::insertSorted() {
43 while (*p !=
nullptr) {
44 if (
getName().compareTo((*p)->getName()) <= 0)
break;
77 unsigned long m = ::millis();
78 #if defined(ARDUINO_ARCH_AVR) || defined(ARDUINO_ARCH_SAMD) || defined(ESP8266) 80 return internal::udiv1000(m);
92 static const char kStatusSuspendedString[] PROGMEM =
"Suspended";
93 static const char kStatusYieldingString[] PROGMEM =
"Yielding";
94 static const char kStatusDelayingString[] PROGMEM =
"Delaying";
95 static const char kStatusRunningString[] PROGMEM =
"Running";
96 static const char kStatusEndingString[] PROGMEM =
"Ending";
97 static const char kStatusTerminatedString[] PROGMEM =
"Terminated";
99 const __FlashStringHelper*
const Coroutine::sStatusStrings[] = {
void resume()
Add a Suspended coroutine into the head of the scheduler linked list, and change the state to Yieldin...
#define ACE_ROUTINE_FPSTR(pstr_pointer)
The FPSTR() macro is defined on ESP8266, not defined on Teensy and AVR, and broken on ESP32...
const FCString & getName() const
Human-readable name of the coroutine.
static const Status kStatusYielding
Coroutine returned using the COROUTINE_YIELD() statement.
static const Status kStatusSuspended
Coroutine has been suspended using suspend() and the scheduler should remove it from the queue upon t...
All coroutines are instances of the Coroutine base class.
virtual unsigned long coroutineMillis() const
Returns the current millisecond clock.
virtual unsigned long coroutineSeconds() const
Returns the current clock in unit of seconds, truncated to the lower 16-bits.
Base class of all coroutines.
static Coroutine ** getRoot()
Get the pointer to the root pointer.
Various macros to smooth over the differences among the various platforms with regards to their suppo...
virtual unsigned long coroutineMicros() const
Returns the current millisecond clock.