RLC Graph: store secs in time_t

This commit is contained in:
Martin Mathieson 2022-08-20 19:56:34 +00:00
parent 5c216de8cc
commit eb197df564
3 changed files with 4 additions and 4 deletions

View File

@ -270,7 +270,7 @@ void LteRlcGraphDialog::fillGraph()
acks_time, acks,
nacks_time, nacks;
for (struct rlc_segment *seg = graph_.segments; seg != NULL; seg = seg->next) {
double ts = seg->rel_secs + seg->rel_usecs / 1000000.0;
double ts = seg->rel_secs + (seg->rel_usecs / 1000000.0);
if (compareHeaders(seg)) {
if (!seg->isControlPDU) {
// Data
@ -618,7 +618,7 @@ void LteRlcGraphDialog::mouseMoved(QMouseEvent *event)
hint += tr("%1 %2 (%3s seq %4 len %5)")
.arg(cap_file_.capFile() ? tr("Click to select packet") : tr("Packet"))
.arg(packet_num_)
.arg(QString::number(packet_seg->rel_secs + packet_seg->rel_usecs / 1000000.0, 'g', 4))
.arg(QString::number(packet_seg->rel_secs + (packet_seg->rel_usecs / 1000000.0), 'g', 4))
.arg(packet_seg->SN)
.arg(packet_seg->pduLength);
tracer_->setGraphKey(ui->rlcPlot->xAxis->pixelToCoord(event->pos().x()));

View File

@ -156,7 +156,7 @@ rlc_lte_tap_info *select_rlc_lte_session(capture_file *cf,
/* For now, still always choose the first/only one */
hdrs->num = fdata->num;
hdrs->rel_secs = (guint32) rel_ts.secs;
hdrs->rel_secs = rel_ts.secs;
hdrs->rel_usecs = rel_ts.nsecs/1000;
hdrs->ueid = th.rlchdrs[0]->ueid;

View File

@ -24,7 +24,7 @@ extern "C" {
struct rlc_segment {
struct rlc_segment *next;
guint32 num; /* framenum */
guint32 rel_secs;
time_t rel_secs;
guint32 rel_usecs;
gboolean isControlPDU;