summaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
authorAlex Wilson <alex.wilson@nokia.com>2012-06-06 13:21:11 +1000
committerQt by Nokia <qt-info@nokia.com>2012-06-12 00:45:07 +0200
commit6766f23e6f23fd27c87ca9889f1257c02842ab00 (patch)
tree6b5cf3bcf6c337fae94b236efbbed030dd6a74da /src/tools
parent9a4e5ed67170a2f4c93e0898057b306ca687dd3a (diff)
Send device's timestamp with sfw debug messages
This makes it match up with timestamps in any other system logs, for easier cross-referencing. Change-Id: I88ce923ecdd6dc9bf7e24a4505fbce0a8f8fcd8f Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/sfwlisten/main.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/tools/sfwlisten/main.cpp b/src/tools/sfwlisten/main.cpp
index 72b1262c..d83c4274 100644
--- a/src/tools/sfwlisten/main.cpp
+++ b/src/tools/sfwlisten/main.cpp
@@ -158,6 +158,13 @@ void SFWReceiver::socketReadyRead()
buff.open(QIODevice::ReadOnly);
QDataStream ds(&buff);
+ quint8 hour,minute,second;
+ quint16 msec;
+ ds >> hour;
+ ds >> minute;
+ ds >> second;
+ ds >> msec;
+
qint32 pid;
ds >> pid;
@@ -169,7 +176,8 @@ void SFWReceiver::socketReadyRead()
delete[] str;
QTime t = QTime::currentTime();
- printf("{%4s} %2d:%02d:%02d.%03d ", qPrintable(intf), t.hour(), t.minute(), t.second(), t.msec());
+ printf("{%4s} %2d:%02d:%02d.%03d ", qPrintable(intf), hour, minute,
+ second, msec);
printf("[%5d/%10s] ", pid, appName.constData());
while (!ds.atEnd()) {
ds.readBytes(str, len);