WindRose 1.0
Custom Hardware , Firmware and Software for Robotic Cellular Automata Experiments
Circadian Class Reference

A class to handle periodic time intervals.

#include <Circadian.h>

Public Member Functions

 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 Public Member Functions

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...
 

Constructor & Destructor Documentation

◆ Circadian()

Circadian::Circadian ( unsigned long  _interval)
Parameters
_intervalThe duration of the interval in milliseconds.

Member Function Documentation

◆ hertzToMillis()

unsigned long Circadian::hertzToMillis ( float  hertz)
static
Parameters
hertzThe frequency in hertz.
Returns
The equivalent period in milliseconds.

◆ hoursToMillis()

unsigned long Circadian::hoursToMillis ( unsigned int  hours)
static
Parameters
hoursThe 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
minutesThe number of minutes.
Returns
The equivalent duration in milliseconds.

◆ secondsToMillis()

unsigned long Circadian::secondsToMillis ( unsigned int  seconds)
static
Parameters
secondsThe number of seconds.
Returns
The equivalent duration in milliseconds.

The documentation for this class was generated from the following files: