/* file: timesGSub.c * Collection of genSub subroutines... *----------------------------------------------------------------------------*/ #include #include #include #include #include #include "genSubRecord.h" #include static long timeAsci( genSubRecord* p){ /*------------------------------------------------------------------------------ * Elapsed time in seconds is converted to ascii time. * input a time stamp 1 in elapsed seconds * input a time stamp 2 in elapsed seconds * output vala ascii time string 1. * output vala ascii time string 2. *----------------------------------------------------------------------------*/ long tm1=(*(long*)p->a); long tm2=(*(long*)p->b); int len,n,m,sec; char* pva=(char*)p->vala; int nva=p->nova; char* pvb=(char*)p->valb; int nvb=p->novb; epicsTimeStamp et; char tstr[64]; sec=tm1; epicsTimeFromTime_t( &et,sec); len=epicsTimeToStrftime( tstr,63,"%m/%d/%Y %H:%M:%S",&et); m=strlen( tstr); if(m