Write the time as per the supplied format. Pointer to buffer populated with the time in text form. Note: The space required is allocated from the thread scratch pad and must not be deleted by the calling function.

Return TypeFunction nameArguments
const char*hzTime::Txt(hzDateFmt,)

Declared in file: hzDate.h
Defined in file : hzDate.cpp

Function Logic:

0:START 1:pBuf 2:unknown 3:items 4:unknown 5:items eFmt 6:eFmt&FMT_TIME_STD 7:items 8:items 9:Return pBuf

Function body:

const char* hzTime::Txt (hzDateFmt eFmt)
{
   //  Write the time as per the supplied format.
   //  
   //  Arguments: 1) eFmt Requested format of output string
   //  
   //  Returns: Pointer to buffer populated with the time in text form.
   //  
   //  Note: The space required is allocated from the thread scratch pad and must not be deleted by the calling function.
   _hzfunc("hzTime::Txt") ;
   char*   pBuf ;  //  Text recepticle
   pBuf = _thisfn.ScratchPad(16);
   if (m_secs == NULL_TIME)
       strcpy(pBuf, "Not set") ;
   else
   {
       if (eFmt & FMT_TIME_DFLT)
           sprintf(pBuf, "%02d%02d%02d", Hour(), Min(), Sec()) ;
       else if (eFmt & FMT_TIME_STD)
           sprintf(pBuf, "%02d:%02d:%02d", Hour(), Min(), Sec()) ;
       else
           strcpy(pBuf, "Invalid Time") ;
   }
   return pBuf ;
}