search for: estimation_interv

Displaying 1 result from an estimated 1 matches for "estimation_interv".

Did you mean: estimation_interval
2004 Aug 06
3
net/sock.c question
...set kbps = 0, kbps_time = now and kbps_bytes = 0 2. after some time, a sock_write*() function is called which in turn calls sock_kbps_update(nobytes); sock_kbps_update fetches current timestamp, adds nobytes to kbps_bytes then: 2.1 if the time difference between now and kbps_time is smaller than ESTIMATION_INTERVAL (which I think a value of 5 seconds should do) then we go back to 2 2.2 if the time difference is greater or equal to ESTIMATION_INTERVAL then we recompute the current kbps by this formula, kbps = (int)(((double)kbps_bytes / (now - kbps_time)) * 8 / 1000) then we store kbps_time = now and rese...