A class to handle periodic time intervals.
#include <Circadian.h>
|
| Circadian (unsigned long _interval) |
| Constructor to initialize the interval and record the current time. More...
|
|
bool | isElapsed () |
| Checks if the interval has elapsed. More...
|
|
|
static unsigned long | secondsToMillis (unsigned int seconds) |
| Converts seconds to milliseconds. More...
|
|
static unsigned long | minutesToMillis (unsigned int minutes) |
| Converts minutes to milliseconds. More...
|
|
static unsigned long | hoursToMillis (unsigned int hours) |
| Converts hours to milliseconds. More...
|
|
static unsigned long | hertzToMillis (float hertz) |
| Converts frequency in hertz to milliseconds (period of the frequency). More...
|
|
◆ Circadian()
Circadian::Circadian |
( |
unsigned long |
_interval | ) |
|
- Parameters
-
_interval | The duration of the interval in milliseconds. |
◆ hertzToMillis()
unsigned long Circadian::hertzToMillis |
( |
float |
hertz | ) |
|
|
static |
- Parameters
-
hertz | The frequency in hertz. |
- Returns
- The equivalent period in milliseconds.
◆ hoursToMillis()
unsigned long Circadian::hoursToMillis |
( |
unsigned int |
hours | ) |
|
|
static |
- Parameters
-
hours | The number of hours. |
- Returns
- The equivalent duration in milliseconds.
◆ isElapsed()
bool Circadian::isElapsed |
( |
| ) |
|
- Returns
- True if the interval has elapsed, false otherwise.
◆ minutesToMillis()
unsigned long Circadian::minutesToMillis |
( |
unsigned int |
minutes | ) |
|
|
static |
- Parameters
-
minutes | The number of minutes. |
- Returns
- The equivalent duration in milliseconds.
◆ secondsToMillis()
unsigned long Circadian::secondsToMillis |
( |
unsigned int |
seconds | ) |
|
|
static |
- Parameters
-
seconds | The number of seconds. |
- Returns
- The equivalent duration in milliseconds.
The documentation for this class was generated from the following files: