|
STM32 core 3.0.1-dev
Arduino core for STM32 based boards: API reference
|
← STM32duino documentation
|
Time functions: millis(), micros(), delay(), delayMicroseconds() and _gettimeofday(). More...
#include "Arduino.h"Functions | |
| unsigned long | millis (void) |
| Get the number of milliseconds since the board started. | |
| unsigned long | micros (void) |
| Get the number of microseconds since the board started. | |
| void | delay (unsigned long ms) |
| Pause the program for the given number of milliseconds. | |
| void | delayMicroseconds (unsigned int us) |
| Pause the program for the amount of time (in microseconds) specified as parameter. | |
| int | _gettimeofday (struct timeval *tv, void *tz) |
| Gives the number of seconds and microseconds since the Epoch. | |
Time functions: millis(), micros(), delay(), delayMicroseconds() and _gettimeofday().
| int _gettimeofday | ( | struct timeval * | tv, |
| void * | tz | ||
| ) |
Gives the number of seconds and microseconds since the Epoch.
Based on milliseconds since last power on.
| tv | Argument is a struct timeval. |
| tz | Argument is a struct timezone (unused). |
| void delay | ( | unsigned long | ms | ) |
Pause the program for the given number of milliseconds.
Calls yield() while waiting, so cooperative threads can run.
| ms | Number of milliseconds to pause. |
| void delayMicroseconds | ( | unsigned int | us | ) |
Pause the program for the amount of time (in microseconds) specified as parameter.
| us | Number of microseconds to pause. |
| unsigned long micros | ( | void | ) |
Get the number of microseconds since the board started.
Interrupt-compatible version.
| unsigned long millis | ( | void | ) |
Get the number of milliseconds since the board started.