<< Previous | Next >>

read_rtc

unsigned long read_rtc( void );

Description

Reads seconds (32 bits) directly from the Real-time Clock (RTC). Use with caution! In most cases use long variable SEC_TIMER, which contains the same result, unless the RTC has been changed since the start of the program.

If you are running the processor off the 32 kHz crystal and using a Dynamic C version prior to 7.30, use read_rtc_32kHz() instead of read_rtc(). Starting with DC 7.30, read_rtc_32kHz() is deprecated because it is no longer necessary. Programmers should only use read_rtc().

Return value

Time in seconds since January 1, 1980 (if RTC set correctly).

Library

RTCLOCK.LIB

See also

write_rtc


Dynamic C Functions << Previous | Next >> rabbit.com