Horloge.
More...
#include <clock.h>
|
| Clock () |
| Constructor.
|
|
virtual | ~Clock () |
| Destructor.
|
|
unsigned long | millis () |
| Number of milliseconds.
|
|
unsigned long | micros () |
| Number of microseconds.
|
|
|
static void | sleep (unsigned long s) |
| Pauses for the amount of seconds.
|
|
static void | delay (unsigned long ms) |
| Pauses for the amount of milliseconds.
|
|
static void | delayMicroseconds (unsigned long us) |
| Pauses for the amount of microseconds.
|
|
Horloge.
- Author
- Pascal JEAN
- Date
- 03/05/18
Definition at line 39 of file clock.h.
◆ Clock()
Piduino::Clock::Clock |
( |
| ) |
|
Constructor.
His call is the origin of the times provided by the millis() and micros() functions.
◆ ~Clock()
virtual Piduino::Clock::~Clock |
( |
| ) |
|
|
virtual |
◆ delay()
static void Piduino::Clock::delay |
( |
unsigned long |
ms | ) |
|
|
static |
Pauses for the amount of milliseconds.
Pauses the thread for the amount of time (in milliseconds) specified as parameter.
- Parameters
-
ms | the number of milliseconds to pause, -1 deaden the thread until it is woken up by a signal |
Referenced by sleep().
◆ delayMicroseconds()
static void Piduino::Clock::delayMicroseconds |
( |
unsigned long |
us | ) |
|
|
static |
Pauses for the amount of microseconds.
Pauses the thread for the amount of time (in microseconds) specified as parameter.
Depending on the value provided, this function can wait for a loop or alarm (for short values) or put the thread into the corresponding number of us.
- Parameters
-
us | the number of milliseconds to pause, -1 deaden the thread until it is woken up by a signal |
◆ micros()
unsigned long Piduino::Clock::micros |
( |
| ) |
|
Number of microseconds.
Returns the number of microseconds since began running the current program.
◆ millis()
unsigned long Piduino::Clock::millis |
( |
| ) |
|
Number of milliseconds.
Returns the number of milliseconds since began running the current program.
◆ sleep()
static void Piduino::Clock::sleep |
( |
unsigned long |
s | ) |
|
|
inlinestatic |
Pauses for the amount of seconds.
Pauses the thread for the amount of time (in seconds) specified as parameter.
- Parameters
-
ms | the number of seconds to pause, -1 deaden the thread until it is woken up by a signal |
Definition at line 67 of file clock.h.
References delay().
◆ _ms
uint64_t Piduino::Clock::_ms |
|
private |
◆ _us
uint64_t Piduino::Clock::_us |
|
private |