Clock: Functions for Real Time Clock

Top  Previous  Next

The clock functions allows the program to interact with the real time clock on the RTCU platform. By using these functions, it is possible to both set and read the built-in clock.

 

Functions for configuring alarms and timers:


clockAlarm

Sets an alarm.


clockDayTimer

Sets a repeating start and stop time.


clockStart

Calls a callback function periodically.


clockWeekTimer

Sets a repeating alarm on a specific weekday at a specific time.

 

Functions for converting between time formats:


clockTimeToLinsec

Converts a time in yy,mm,dd,hh,mm,ss format to number of seconds since 1980-1-1 00:00:00.


clockLinsecToTime

Converts a time in number of seconds since 1980-1-1 00:00:00 to yy,mm,dd,hh,mm,ss format.

 

Functions for working with the clock:


clockGet

Reads the time-of-day.


clockNow

Reads the time-of-day as a number of seconds since 1980-1-1 00:00:00 (LINSEC)


clockSet

Sets the time-of-day.


clockSetWakeup

Configures the system to wake from pmSuspend at a specific time.

 

 
LINSEC

In many of the functions, the term LINSEC is used which stands for Linear Seconds.

In the RTCU concept, a LINSEC value is the number of seconds since 1980-1-1 00:00:00.