#ifndef _MODULE_RTC_h #define _MODULE_RTC_h #include "watchos_consts.h" #include "watchos_types.h" #include "Task.h" #include "IRunnable.h" /// /// Module responsible for managing RTC hardware and alarms and generating events /// class Module_RTC : public Task, public IRunnable { /// /// Refresh our in-memory time from the RTC /// void refresh(); public: Module_RTC(); void initialize(); void start(); void suspend(); void tick(); /// /// Get the hours component of the current time /// /// current hour; 0-23 int getHour(); /// /// Get the minutes component of the current time /// /// current minute; 0-59 int getMinute(); /// /// Get the seconds component of the current time /// /// current seconds; 0-59 int getSecond(); /// /// Get the year component of the current date /// /// current year; e.g., 2021 int getYear(); /// /// Get the month component of the current date /// /// current month; 1-12 int getMonth(); /// /// Get the day component of the current date /// /// current day; 1-31 int getDay(); /// /// Get the day of week component of the current date /// /// current day of week; Sunday-Saturday char* getDayOfWeek(); }; #endif