AceTime  0.3
Date and time classes for Arduino that support timezones from the TZ Database, and a system clock that can synchronize from an NTP server or an RTC chip.
Public Member Functions | List of all members
ace_time::clock::SystemClockHeartbeatCoroutine Class Reference

A coroutine that calls SystemClock.getNow() peridically. More...

#include <SystemClockHeartbeatCoroutine.h>

Inheritance diagram for ace_time::clock::SystemClockHeartbeatCoroutine:
Inheritance graph
[legend]
Collaboration diagram for ace_time::clock::SystemClockHeartbeatCoroutine:
Collaboration graph
[legend]

Public Member Functions

 SystemClockHeartbeatCoroutine (SystemClock &systemClock, uint16_t heartbeatPeriodMillis=5000)
 Constructor. More...
 
int runCoroutine () override
 

Detailed Description

A coroutine that calls SystemClock.getNow() peridically.

This must be performed before the uint16_t timer in SystemClock overflows, i.e. every 65535 milliseconds at a minimum. I recommend every 5000 millis, which is the default.

Definition at line 16 of file SystemClockHeartbeatCoroutine.h.

Constructor & Destructor Documentation

◆ SystemClockHeartbeatCoroutine()

ace_time::clock::SystemClockHeartbeatCoroutine::SystemClockHeartbeatCoroutine ( SystemClock systemClock,
uint16_t  heartbeatPeriodMillis = 5000 
)
inline

Constructor.

Parameters
systemClockthe underlying SystemClock
heartbeatPeriodMillismilliseconds between calls to getNow() (default 5000)

Definition at line 25 of file SystemClockHeartbeatCoroutine.h.


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