I recommend that you not use this function. Instead, assuming you need date broken out, use mktm() to load a time struct from SEC_TIMER. This assumes that you have used mktime() and write_rtc() to set the timer with a RCM or SBC that has a backup battery or every time after a power cycle.
It is better not to directly access the RTC if you don’t REALLY need to.
[QUOTE=ideaman4u;1355]I recommend that you not use this function. Instead, assuming you need date broken out, use mktm() to load a time struct from SEC_TIMER. This assumes that you have used mktime() and write_rtc() to set the timer with a RCM or SBC that has a backup battery or every time after a power cycle.
It is better not to directly access the RTC if you don’t REALLY need to.[/quote]
I appreciate your advice!
I wrote a program to implement mktm(), however after compilation all that appeared was my code with green highlighting over one of my variables(shown below).
Code Start
void main()
{
//unsigned int mktm( struct tm *timeptr, unsigned long time );
unsigned int x,y,t;
struct tm *p;
int i;
t = 0; // *** highlighted variable ***
i = 0;
I wrote a program to implement mktm(), however after compilation all that appeared was my code with green highlighting over one of my variables(shown below).
Code Start
void main()
{
//unsigned int mktm( struct tm *timeptr, unsigned long time );
unsigned int x,y,t;
struct tm *p;
int i;
t = 0; // *** highlighted variable ***
i = 0;