Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
5.1k views
in Java FTP by (160 points)
Hi,
I am uploading/downloading a file and i want total time taken for uploading/downloading a file. How can i get it?


Thanks & Regards,
Brijesh

4 Answers

0 votes
by (162k points)
The simplest way is System.currentTimeMillis() before and after the transfer.
0 votes
by (160 points)
But what if i have used uploadFileAsync() method for uploading? In that case time taken is 0.
0 votes
by
By the way,if an error occurs while downloading,when resuming transfer, the way invoking System.currentTimeMillis() before and after the transfer will not work.
0 votes
by (162k points)
Take a look at the events - Downloading and Downloaded, similar for uploading. You can set up the events to record the time taken.

Categories

...