@@ -279,7 +279,7 @@ void KsTraceGraph::_resetPointer(uint64_t ts, int cpu, int pid)
QString pointer;
kshark_convert_nano(ts, &sec, &usec);
- pointer.sprintf("%lu.%lu", sec, usec);
+ pointer.sprintf("%lu.%06lu", sec, usec);
_labelP2.setText(pointer);
if (pid > 0 && cpu >= 0) {
@@ -315,7 +315,7 @@ void KsTraceGraph::_setPointerInfo(size_t i)
uint64_t sec, usec;
kshark_convert_nano(e->ts, &sec, &usec);
- pointer.sprintf("%lu.%lu", sec, usec);
+ pointer.sprintf("%lu.%06lu", sec, usec);
_labelP2.setText(pointer);
comm.append("-");
@@ -601,17 +601,17 @@ void KsTraceGraph::_updateTimeLegends()
QString tMin, tMid, tMax;
kshark_convert_nano(_glWindow.model()->histo()->min, &sec, &usec);
- tMin.sprintf("%lu.%lu", sec, usec);
+ tMin.sprintf("%lu.%06lu", sec, usec);
_labelXMin.setText(tMin);
tsMid = (_glWindow.model()->histo()->min +
_glWindow.model()->histo()->max) / 2;
kshark_convert_nano(tsMid, &sec, &usec);
- tMid.sprintf("%lu.%lu", sec, usec);
+ tMid.sprintf("%lu.%06lu", sec, usec);
_labelXMid.setText(tMid);
kshark_convert_nano(_glWindow.model()->histo()->max, &sec, &usec);
- tMax.sprintf("%lu.%lu", sec, usec);
+ tMax.sprintf("%lu.%06lu", sec, usec);
_labelXMax.setText(tMax);
}
@@ -203,8 +203,8 @@ class EventView(gtk.TreeView):
return False
if data == "ts":
- cell.set_property("markup", "%d.%d" % (ev.ts/1000000000,
- ev.ts%1000000000))
+ cell.set_property("markup", "%d.%09d" % (ev.ts/1000000000,
+ ev.ts%1000000000))
data_func_cnt = data_func_cnt + 1
if app:
app.inc_data_func()
@@ -62,7 +62,7 @@ class Event(object, DictMixin):
self._format = format
def __str__(self):
- return "%d.%d CPU%d %s: pid=%d comm=%s type=%d" % \
+ return "%d.%09d CPU%d %s: pid=%d comm=%s type=%d" % \
(self.ts/1000000000, self.ts%1000000000, self.cpu, self.name,
self.num_field("common_pid"), self.comm, self.type)