wiki:Docs/Prog/Manual/ApplicationLibraries/lib825ev/Time/GetTimeStr

Version 4 (modified by Don Wilson, 13 years ago) ( diff )

--

GetTimeStr

Get the time

string GetTimeStr(int secs);

char* GetTimeStr(char* pszBuffer, int secs);

Parameters

  • secs - 0 = format time without secs, 1 = include seconds
  • pszBuffer - buffer to hold formatted time, application programmer must insure that this buffer is large enough for the time.

Return Value

  • 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.

Remarks

This function returns the time information that is in memory based on a previous call to GetLinuxTime() or IsTimeChanged().

Examples

string strTime = GetTimeStr(1);
DisplayText(10, 10, strTime);
char szTime[20];
GetTimeStr(szTime, 1);
DisplayText(10, 10, szTime);

See Also

Note: See TracWiki for help on using the wiki.