Changes between Version 6 and Version 7 of Docs/Prog/Manual/ApplicationLibraries/lib825ev/Time/GetTimeStr


Ignore:
Timestamp:
01/29/21 09:22:33 (4 years ago)
Author:
Don Wilson
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Docs/Prog/Manual/ApplicationLibraries/lib825ev/Time/GetTimeStr

    v6 v7  
    66
    77char* GetTimeStr(char* pszBuffer, int secs);
     8
     9string GetTimeStr(datetime_struct* pTime, int secs;
     10
     11char* GetTimeStr(datetime_struct* pTime, char* pszBuffer, int secs);
    812}}}
    913
     
    1216 * secs - 0 = format time without secs, 1 = include seconds
    1317 * pszBuffer - buffer to hold formatted time, application programmer must insure that this buffer is large enough for the time.
     18 * pTime - pointer to datetime_struct to format the time from instead of current time.
    1419
    1520== Return Value ==
    1621
    17  * Returns the time formatted as "HH:MM:SS" or "HH-MM-SS", or "HH:MM x.m.", based on boot loader preferences. Application developers should consider that time string will be longer if preferences are set for 12 hour time.
     22 * Returns the time formatted as "HH:MM:SS" or "HH-MM-SS", or "HH:MM x.m.", based on boot loader preferences. Application developers should consider that time string will be longer if preferences are set for 12 hour time. The versions of the function that take a pointer to a datetime_struct allow a string to be formatted from an arbitrary time.
    1823
    1924== Remarks ==
     
    3439}}}
    3540
     41{{{
     42datetime_struct dt;
     43dt.hour = 9;
     44dt.minute = 21;
     45dt.second = 30;
     46
     47string strTime = GetTimeStr(&dt, 1);
     48DisplayText(10, 10, strTime);
     49}}}
     50
     51{{{
     52datetime_struct dt;
     53dt.hour = 9;
     54dt.minute = 21;
     55dt.second = 30;
     56
     57char szTime[20];
     58
     59GetTimeStr(&dt, szTime, 1);
     60DisplayText(10, 10, szTime);
     61}}}
     62
    3663== See Also ==
    3764