Skip to content
Snippets Groups Projects
Commit c5c2689d authored by Henrik Tjäder's avatar Henrik Tjäder
Browse files

Proper creation of the max and min delay

parent f8d063f8
No related branches found
No related tags found
No related merge requests found
...@@ -28,8 +28,10 @@ def udp_client_receive(UDP_RECEIVE_IP, UDP_RECEIVE_PORT): ...@@ -28,8 +28,10 @@ def udp_client_receive(UDP_RECEIVE_IP, UDP_RECEIVE_PORT):
global packet_count_rcvd global packet_count_rcvd
global cumulative_delay global cumulative_delay
global min_delay = 100. global min_delay
global max_delay = 0. global max_delay
min_delay = 100.
max_delay = 0.
packet_count_rcvd = 0 packet_count_rcvd = 0
cumulative_delay=0. cumulative_delay=0.
...@@ -55,6 +57,7 @@ def udp_client_receive(UDP_RECEIVE_IP, UDP_RECEIVE_PORT): ...@@ -55,6 +57,7 @@ def udp_client_receive(UDP_RECEIVE_IP, UDP_RECEIVE_PORT):
max_delay = rt_delay max_delay = rt_delay
if rt_delay < min_delay: if rt_delay < min_delay:
min_delay = rt_delay min_delay = rt_delay
print (max_delay, min_delay)
packet_count_rcvd=packet_count_rcvd+1 packet_count_rcvd=packet_count_rcvd+1
cumulative_delay=cumulative_delay+rt_delay cumulative_delay=cumulative_delay+rt_delay
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment