summaryrefslogtreecommitdiff
path: root/BPQNRR.c
diff options
context:
space:
mode:
authorDave Hibberd <hibby@debian.org>2026-09-29 21:39:24 +0100
committerDave Hibberd <hibby@debian.org>2026-09-29 21:39:24 +0100
commit592e5967b8fcd79423802071319d0c646f2080df (patch)
tree0eef3a28cfe1a939caf9d61e419a56d79b3c38e3 /BPQNRR.c
parent23de03a0c8bf8a564cc0442f49d050ed11e372b8 (diff)
New upstream version 6.0.25.41+repackupstream/6.0.25.41+repack
Diffstat (limited to 'BPQNRR.c')
-rw-r--r--BPQNRR.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/BPQNRR.c b/BPQNRR.c
index 2360aa9..2bcab5c 100644
--- a/BPQNRR.c
+++ b/BPQNRR.c
@@ -78,8 +78,8 @@ VOID NRRecordRoute(UCHAR * Buff, int Len)
UCHAR * BUFFER = GetBuff();
UCHAR * ptr1;
struct _MESSAGE * Msg1;
- time_t Now = time(NULL);
int ID = (Msg->L4TXNO << 8) | Msg->L4RXNO;
+ int RTT = (int)GetTickCount() - NRRSession->NRRTicks;
if (BUFFER == NULL)
return;
@@ -96,10 +96,13 @@ VOID NRRecordRoute(UCHAR * Buff, int Len)
*ptr1++ = 0xf0; // PID
- if (ID == NRRSession->NRRID)
- ptr1 += sprintf(ptr1, "NRR Response in %d Secs:", (int)(Now - NRRSession->NRRTime));
+ if (ID == NRRSession->NRRID)
+ if (RTT < 1000)
+ ptr1 += sprintf(ptr1, "NRR Response in %dmS:", RTT);
+ else
+ ptr1 += sprintf(ptr1, "NRR Response in %2.2fs:", RTT / 1000.0f);
else
- ptr1 += sprintf(ptr1, "NRR Response:", (int)(Now - NRRSession->NRRTime));
+ ptr1 += sprintf(ptr1, "NRR Response:");
Buff += 21 + MSGHDDRLEN;
Len -= (21 + MSGHDDRLEN);
@@ -206,8 +209,9 @@ VOID SendNRRecordRoute(struct DEST_LIST * DEST, TRANSPORTENTRY * Session)
Msg->LENGTH = 8 + 21 + MSGHDDRLEN;
- Session->NRRTime = time(NULL);
+ Session->NRRTicks = GetTickCount();
Session->NRRID = NRRID++;
C_Q_ADD(&DEST->DEST_Q, Msg);
}
+