Code for upload speed and time remaining

If you find this useful or implement it into your code, please be kind and leave a comment - and a link to your upload if you wish.

Can't upload the example files at this time to the site. Download updated files at http://www.remoko.com/shell/swfupload_files.zip Example files are for simpledemo.
Contains:
v2.1.0 Beta2 handlers
AND
v2.2.0 Beta3 handlers, queue

v2.2.0 Beta 3 - Tested - Attached file(s) named v2.2.0Beta3
For this to work in beta 3, you need to apply the fix from http://www.swfupload.org/forum/generaldiscussion/1072

Changes:
Using Math.round instead of old roundNumber function.
Progress now shows x.yz MB instead of x.y MB.
Name changes for a few variables rndfilesize to MBTotal, uploaded to MBUploaded.

===========================
v2.1.0 Beta 2 - Tested - Attached file(s) named v2.1.0Beta2
03.30.08 - Created minsec function to clean up a few variables

Modifications made by Daem0nX (03.29.08)
Please note I dont work with JS very often so...
There is no warranty with this code.
Hope this helps some of those asking / wanting / needing this code update.
To the devs of SWFUpload - Keep up the awesome work =)

Modification to uploadStart
Captures start time (iTime)

Modification to uploadSuccess
Now shows "Completed in xx.yy minutes/seconds

Additional vars that can be used in UploadProgress
Default info format - 0.1 of 3 MB at 51 KB/sec; 01:39 remain (2%)
Look in that section for more info
Upload speed
Time elapsed
Time remaining

AttachmentSize
Preview-Uploading.png4.69 KB
Preview-Completed.png2.85 KB

Hello, I can't get this to

Hello,

I can't get this to work.. any chance you'd like to try and see what is wrong?

It shows correct files sizes, but shows 0 for the speed and stays at "Estimating" forever for the time remaining.

.8 of 6 MB at 0 KB/sec; Estimating...

Testing on v2.2.0 Beta 3

Thanks for pointing this out. As soon as I have it working I'll update the entry above.

Done a little editing so far, not sure what the issue is yet. I'll keep working on it.

If you revert back to the v2.1.0 release of swfupload.queue.js my script works. I'm now taking a look at the new file in v2.2.0 b3 to see what breaks my code.

There is a bug in the queue file for v2.2.0 Beta 3. If you correct the file as pointed out here http://www.swfupload.org/forum/generaldiscussion/1072 then my code works again.