okapi::AbstractRate class

Derived classes

class Rate

Constructors, destructors, conversion operators

~AbstractRate() virtual

Public functions

void delay(QFrequency ihz) pure virtual
Delay the current task such that it runs at the given frequency.
void delayUntil(QTime itime) pure virtual
Delay the current task until itime has passed.
void delayUntil(uint32_t ims) pure virtual
Delay the current task until ims milliseconds have passed.

Function documentation

void okapi::AbstractRate::delay(QFrequency ihz) pure virtual

Delay the current task such that it runs at the given frequency.

Parameters
ihz the frequency

The first delay will run for 1000/(ihz). Subsequent delays will adjust according to the previous runtime of the task.

void okapi::AbstractRate::delayUntil(QTime itime) pure virtual

Delay the current task until itime has passed.

Parameters
itime the time period

This method can be used by periodic tasks to ensure a consistent execution frequency.

void okapi::AbstractRate::delayUntil(uint32_t ims) pure virtual

Delay the current task until ims milliseconds have passed.

Parameters
ims the time period

This method can be used by periodic tasks to ensure a consistent execution frequency.