Skip to content

Commit

Permalink
feat: print timeout with correct decimal time
Browse files Browse the repository at this point in the history
  • Loading branch information
Pablito2020 committed Mar 1, 2024
1 parent 9f2c178 commit 60a7ab3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
From dac3488da01c8e5ce8b3f0dadb91adb41451e484 Mon Sep 17 00:00:00 2001
From 1e0ea5fb708764bb5087043dd162409602744175 Mon Sep 17 00:00:00 2001
From: Pablo Fraile Alonso <pablo@pablofraile.net>
Date: Mon, 26 Feb 2024 15:39:29 +0100
Subject: [PATCH] feat: print timeout on timeout timer update
Date: Thu, 29 Feb 2024 20:17:56 +0100
Subject: [PATCH] feat: print timeout

---
tcp/tcp.cc | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tcp/tcp.cc b/tcp/tcp.cc
index a919c8c..de6ee95 100644
index a919c8c..2dcbed8 100644
--- a/tcp/tcp.cc
+++ b/tcp/tcp.cc
@@ -978,7 +978,10 @@ void TcpAgent::reset_rtx_timer(int mild, int backoff)
*/
void TcpAgent::set_rtx_timer()
{
- rtx_timer_.resched(rtt_timeout());
+ double now = Scheduler::instance().clock();
+ double timeout = rtt_timeout();
+ printf("Time: %d Timeout %d\n", now, timeout);
+ double now = Scheduler::instance().clock();
+ rtx_timer_.resched(timeout);
+ fprintf(stderr, ""TIME_FORMAT" "TIME_FORMAT" \n", now, timeout);
}

/*
Expand Down
6 changes: 3 additions & 3 deletions src/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ source=(http://downloads.sourceforge.net/sourceforge/nsnam/ns-2/"${pkgver}"/ns-s
ns-2.35-tcl86.patch
ns-2.35-getopts.patch
ns-2.35-gcc-compile-errors.patch
0001-feat-print-timeout-on-timeout-timer-update.patch
0001-feat-print-timeout.patch
ns-2.35-use-std-cpp14.patch)
sha256sums=('2a32e831bcec7d255042a544577559d15eae67696d0e3d30881cedc1112e2387'
'aedba646d1bc4d716031f9ea996e6d99c9bb227e7647138cccf39bdd6c069c3a'
'7aa4a22492f2be37c81fcdc813972a6bde105e183a013d7b814a56f7bcef872c'
'4d02ff0cf1c79d67c440c788d7163c7c873a6e4e2970bab3319cbe29f9b20c14'
'd3a6e6bcc22ca9aa8f8901774eb58a4df3f2f4d6856a260561568a5a6d9f600e'
'753ef3ed1c175407611e92b50a70c5d7d1b75e90e42f5d65c758152ae74ec1bf'
'cb1aa3c3b769735e28ec3315e084b31203f2e52eef9acc4a82218fe6dd7164b4'
'2fac6b24607dedfd8b96c70a9222f0b92318b2cf0cc1501caf8c1a796771547d')

optdepends=('nam: Tcl/TK based animation tool for viewing network simulation traces',
Expand All @@ -37,7 +37,7 @@ prepare() {
patch -uNp1 -i ../ns-2.35-getopts.patch
patch -uNp1 -i ../ns-2.35-gcc-compile-errors.patch
patch -uNp1 -i ../ns-2.35-use-std-cpp14.patch
patch -uNp1 -i ../0001-feat-print-timeout-on-timeout-timer-update.patch
patch -uNp1 -i ../0001-feat-print-timeout.patch
}

build() {
Expand Down

0 comments on commit 60a7ab3

Please sign in to comment.