Really support milliseconds in wxLog
Although this was supposed to work, specifying "%l" in wxLog time stamp format actually didn't because wxLog timestamps were stored as seconds. Fix this by storing them as milliseconds and add a simple test (not executed by default) showing that "%l" works correctly now. Still keep the old wxLogRecordInfo::timestamp field for compatibility, as it was documented. See #13059.
This commit is contained in:
@@ -342,7 +342,7 @@ void wxLogGui::DoLogRecord(wxLogLevel level,
|
||||
{
|
||||
m_aMessages.Add(msg);
|
||||
m_aSeverity.Add(wxLOG_Message);
|
||||
m_aTimes.Add((long)info.timestamp);
|
||||
m_aTimes.Add((long)(info.timestampMS / 1000));
|
||||
m_bHasMessages = true;
|
||||
}
|
||||
break;
|
||||
@@ -395,7 +395,7 @@ void wxLogGui::DoLogRecord(wxLogLevel level,
|
||||
|
||||
m_aMessages.Add(msg);
|
||||
m_aSeverity.Add((int)level);
|
||||
m_aTimes.Add((long)info.timestamp);
|
||||
m_aTimes.Add((long)(info.timestampMS / 1000));
|
||||
m_bHasMessages = true;
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user