When using the perl module LWP::Simple, is there a simple way to determine the speed and amount downloaded by a single getstore() invocation? This would be useful for observing the status of large file downloads.
Off the top of my head, one approach would be to:
- store the current time (time0)
- run getstore in a new process
- poll the known destination file
- the amount downloaded would be the current file size (size)
- the download speed would (size / current_time - time0)
I'm wondering if there's a simpler way.
Alternative suggestions welcome (perhaps I should use a different module?)