Time and Delay
Provides time and delay functions. More...
Collaboration diagram for Time and Delay:
Macros | |
#define | delayMilliseconds(ms) delay(ms) |
Pause execution. More... | |
Functions | |
unsigned long | millis (void) |
Get the system (up)time in milliseconds. More... | |
unsigned long | micros (void) |
Get the time from clock in microseconds. More... | |
void | delay (uint32_t milliseconds) |
Pause execution. More... | |
void | delayMicroseconds (uint32_t time) |
Pause execution. More... | |
Detailed Description
Provides time and delay functions.
Macro Definition Documentation
◆ delayMilliseconds
#define delayMilliseconds | ( | ms | ) | delay(ms) |
Pause execution.
- Parameters
-
ms Duration of delay in milliseconds
Function Documentation
◆ delay()
void delay | ( | uint32_t | milliseconds | ) |
Pause execution.
- Parameters
-
milliseconds Duration of delay
- Note
- Try to avoid calling this function, instead use a Timer or SimpleTimer
◆ delayMicroseconds()
void delayMicroseconds | ( | uint32_t | time | ) |
Pause execution.
- Parameters
-
time Duration of delay in microseconds
◆ micros()
unsigned long micros | ( | void | ) |
Get the time from clock in microseconds.
- Return values
-
unsigned long Quantity of microseconds elapsed since clock epoch
- Note
- Clock epoch will reset every 71 minutes, 47 seconds, 967296 microseconds
- This function uses ESP8266 system time clock which pauses during sleep. Function is provided for compatibility with Arduino. For date and time functionality, use SystemClock
- See also
- SystemClockClass
◆ millis()
unsigned long millis | ( | void | ) |
Get the system (up)time in milliseconds.
- Return values
-
unsigned long Quantity of milliseconds elapsed since clock epoch
- Note
- Clock epoch will reset every 49 days, 17 hours, 2 minutes, 47 seconds, 296 milliseconds
- This function uses ESP8266 system time clock which pauses during sleep. Function is provided for compatibility with Arduino. For date and time functionality, use SystemClock
- See also
- SystemClockClass