MCPcopy Create free account
hub / github.com/OpenZWave/open-zwave / GetAsString

Method GetAsString

cpp/src/platform/windows/TimeStampImpl.cpp:89–101  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Return a string representation -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

87// Return a string representation
88//-----------------------------------------------------------------------------
89string TimeStampImpl::GetAsString
90(
91)
92{
93 // Convert m_stamp (FILETIME) to SYSTEMTIME for ease of use
94 SYSTEMTIME time;
95 ::FileTimeToSystemTime( (FILETIME*)&m_stamp, &time );
96
97 char buf[100];
98 sprintf_s( buf, sizeof(buf), "%04d-%02d-%02d %02d:%02d:%02d:%03d ", time.wYear, time.wMonth, time.wDay, time.wHour, time.wMinute, time.wSecond, time.wMilliseconds );
99 string str = buf;
100 return str;
101}
102
103//-----------------------------------------------------------------------------
104// <TimeStampImpl::operator->

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected