Hi,

I have a question in regards to function rtt_update of class TcpAgent.
Here is the code:


================= BEGIN CODE =================================
void TcpAgent::rtt_update(double tao)
{
        ...
                double sendtime = now - tao;
                sendtime += boot_time_;
                double tickoff = fmod(sendtime, tcp_tick_);
                printf("sendtime = %2.4f, boot_time_ = %2.4f, tickoff =
%2.4f\n",sendtime,boot_time_,tickoff);
                t_rtt_ = int((tao + tickoff) / tcp_tick_);
        }
...
}
================= END CODE =================================
Why can't we use 'tao' as an RTT sample? Why do we have to consider
"boot_time_" ?  It seems like "tickoff" is the offset which helps
line up tao to the end of "tcp_tick" after "boot_time_" is
considered. But why do we need to consider "boot_time_".

Thanks a lot.
Teerawat

Reply via email to