N
None
I'm using the HttpWebRequest/Response methods and I'm trying to figure
out how to calculate the effective transfer rare the file is being
received at (like you see in IE when you download something). I have
already learned how to do a "progress bar" type solution, which lets
me calculate percentages. This is different however, because rate
implies time.
I've tried making a timer that goes off once a second and then
applying (bytes downloded now - bytes downloaded last interval), I get
inaccurate speed (584 KB/s when it's more like 230 KB/s)
then I tried recording the ticks between 2 successive read calls in a
loop, dividing that by the number of ticks in a second, getting the
inverse of that and multiplying by 4 (bc my buffer is 4k). Still no
good
If anyone has any solutions I'd love to hear them. Thanks.
out how to calculate the effective transfer rare the file is being
received at (like you see in IE when you download something). I have
already learned how to do a "progress bar" type solution, which lets
me calculate percentages. This is different however, because rate
implies time.
I've tried making a timer that goes off once a second and then
applying (bytes downloded now - bytes downloaded last interval), I get
inaccurate speed (584 KB/s when it's more like 230 KB/s)
then I tried recording the ticks between 2 successive read calls in a
loop, dividing that by the number of ticks in a second, getting the
inverse of that and multiplying by 4 (bc my buffer is 4k). Still no
good
If anyone has any solutions I'd love to hear them. Thanks.