Add epicsTime_gmtime and epicsTime_localtime routines. Code is identical to

that in posix/osdTime.cpp.
This commit is contained in:
W. Eric Norum
2002-01-31 15:35:06 +00:00
parent d763c0bfce
commit 52a6a1a75a

View File

@@ -86,4 +86,27 @@ void clockInit(void)
rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &rtemsTicksPerSecond);
rtemsTicksPerSecond_double = rtemsTicksPerSecond;
}
int epicsTime_gmtime ( const time_t *pAnsiTime, struct tm *pTM )
{
struct tm * pRet = gmtime_r ( pAnsiTime, pTM );
if ( pRet ) {
return epicsTimeOK;
}
else {
return epicsTimeERROR;
}
}
int epicsTime_localtime ( const time_t *clock, struct tm *result )
{
struct tm * pRet = localtime_r ( clock, result );
if ( pRet ) {
return epicsTimeOK;
}
else {
return epicsTimeERROR;
}
}
}