I am trying to make some changes to congestion control in libuinet. I need to track the current time (or up time). I have tried using the nanotime/microtime and nanouptime/microuptime functions in sys/time.h but the timespec/timeval struct returned always has tv_sec=1. It does not change.
A simple test to replicate this issue would be to add the following lines at the top of the cc_ack_received function in sys/netinet/tcp_input.c:
I tried to trace the function calls in the sys/ folder as well as the uinetkern*.c files but I can't figure out why the tv_sec value is always equal to 1.
I am trying to make some changes to congestion control in libuinet. I need to track the current time (or up time). I have tried using the nanotime/microtime and nanouptime/microuptime functions in sys/time.h but the timespec/timeval struct returned always has tv_sec=1. It does not change.
A simple test to replicate this issue would be to add the following lines at the top of the cc_ack_received function in sys/netinet/tcp_input.c:
I tried to trace the function calls in the sys/ folder as well as the uinetkern*.c files but I can't figure out why the tv_sec value is always equal to 1.