Datenshi Posted July 23, 2009 Share Posted July 23, 2009 (edited) - this was inaccurate Edited August 24, 2009 by Datenshi RapidQueuer 2.4 - For Rapidshare.comOpensubtitles Hashing FuncRevision3 PlayerGTPlayer BetaIMDB & Poster Grabber v1.3Fetgrek.com - My Website Link to comment Share on other sites More sharing options...
pinchly Posted July 23, 2009 Share Posted July 23, 2009 I saw your comment about this on the Rapid Queuer post, and followed it here. If you want the true average since the download started, rather than for the last second or several seconds, I suggest the following: ProgressOn("Testing", "Test", "Test", 1, 1, 16) $iSize = InetGetSize("http://releases.ubuntu.com/jaunty/ubuntu-9.04-desktop-i386.iso") InetGet("http://releases.ubuntu.com/jaunty/ubuntu-9.04-desktop-i386.iso", "ubuntu-9.04-desktop-i386.iso", 1, 1) DownloadProcess($iSize) Exit Func DownloadProcess($iSize) $Timer = TimerInit() While @InetGetActive $iBytesRead = @InetGetBytesRead $iPercent = Int(($iBytesRead / $iSize) * 100) ProgressSet($iPercent, $iBytesRead & " bytes read or " & $iSize &@LF& Int($iBytesRead / (TimerDiff($Timer) / 1000) / 1000) & " KB/s" &@LF& "(" & StringLeft(TimerDiff($Timer) / 1000, 5) & " seconds)", "test") Sleep(1000) WEnd EndFunc ;==>DownloadProcess Cheers, Pinchly Link to comment Share on other sites More sharing options...
Datenshi Posted July 23, 2009 Author Share Posted July 23, 2009 ello pinchly! yupp yours is good, but mines targeted towards a more random flow of data, by that i mean..if i used your example and I'm downloading a file that's 500mb, at 250mb i start another download and loose half of my speed or my computer locks up and reports inaccurate speeds, that will throw off the accuracy of average in your script for the whole download process, using my method would trow it off for a couple of seconds until it fully recovers. Any "estimated time to finish" of such a file wouldn't be affected. In an optimal transfer your script would be more accurate then mine, Increasing the size of stored speeds in my array increases the accuracy but lowers the speed and recovery rate from a possible speed disturbance. RapidQueuer 2.4 - For Rapidshare.comOpensubtitles Hashing FuncRevision3 PlayerGTPlayer BetaIMDB & Poster Grabber v1.3Fetgrek.com - My Website Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now