Hi
Trying to establish the true download speed for a computer.
I'm downloading a 1MB file measure the time to get a mom. speed indication.
I'm playing with the program below
In principal it works fine. (1/(startime-stoptime) gives me a mom. MB/sec number.
However I face 1 issue.
The first time I run the program it gives me a correct reading.
The second time I let the program run the reading is way too fast.
I replaced the GET for a POST in the WinHttpReq.open statement. (Since i suspected it would read from a cache) that does slow it down but still way too fast but still correct the first time I run the program.
To go back to the initial state (where the program works correct) I have to switch off the complete MSaccess program (so not only the database) and then I get a correct reading again for one pass.
Does any body have any idea why this happens? I also tried WinHttpReq.close but that isn't allowed.
:banghead:
Trying to establish the true download speed for a computer.
I'm downloading a 1MB file measure the time to get a mom. speed indication.
I'm playing with the program below
Code:
Dim myURL As String
myURL = "https://androidnetworktester.googlecode.com/files/1mb.txt"
Dim WinHttpReq As Object
Set WinHttpReq = CreateObject("Microsoft.XMLHTTP")
WinHttpReq.Open "get", myURL, True ', "username", "password"
starttime = Timer()
WinHttpReq.send
Do While WinHttpReq.ReadyState <> 4
DoEvents
Loop
stoptime = Timer()
In principal it works fine. (1/(startime-stoptime) gives me a mom. MB/sec number.
However I face 1 issue.
The first time I run the program it gives me a correct reading.
The second time I let the program run the reading is way too fast.
I replaced the GET for a POST in the WinHttpReq.open statement. (Since i suspected it would read from a cache) that does slow it down but still way too fast but still correct the first time I run the program.
To go back to the initial state (where the program works correct) I have to switch off the complete MSaccess program (so not only the database) and then I get a correct reading again for one pass.
Does any body have any idea why this happens? I also tried WinHttpReq.close but that isn't allowed.
:banghead: