Commit df00e12e authored by Claes Sjofors's avatar Claes Sjofors

co_time, new function time_PrintA to print an absolute time

parent 59f08ce9
......@@ -2293,3 +2293,14 @@ int time_PeriodZoomOut( time_ePeriod *period)
}
return changed;
}
//! Print an absolute time. The format should contain %s.
int time_PrintA( const char *format, pwr_tTime *ts)
{
char timstr[40];
time_AtoAscii( ts, time_eFormat_DateAndTime, timstr, sizeof(timstr));
return printf( format, timstr);
}
......@@ -228,6 +228,7 @@ void time_NextPeriod( time_ePeriod period, pwr_tTime *prev_from, pwr_tTim
pwr_tTime *from, pwr_tTime *to);
int time_PeriodZoomIn( time_ePeriod *period);
int time_PeriodZoomOut( time_ePeriod *period);
int time_PrintA( const char *format, pwr_tTime *ts);
#if defined(OS_ELN)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment