Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.

ICEFDownloadItem.EndTime

Post Reply
7bit
Posts: 4
Joined: Sat Jun 26, 2021 11:43 am

ICEFDownloadItem.EndTime

Post by 7bit »

Hello! Tell me how to use this property? I want to show the end time of the download when uploading a file, but this property contains some strange value. For example, it could be 01.01.1601 (as the number -109205).
User avatar
salvadordf
Posts: 4016
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: ICEFDownloadItem.EndTime

Post by salvadordf »

Hi,

All the properties and methods in that interface correspond to this CEF class :
https://magpcss.org/ceforum/apidocs3/projects/(default)/CefDownloadItem.html

EndTime has a different meaning :
Returns the time that the download ended.
7bit
Posts: 4
Joined: Sat Jun 26, 2021 11:43 am

Re: ICEFDownloadItem.EndTime

Post by 7bit »

Thanks for the link, but there is very little information there. Some value is returned, but I cannot understand how to interpret it.
I expected the return value to be date and time. For example, the current time is 06/27/2021 11:34, and EndTime returns 06/27/2021 11:56. And calculating the difference between the end time and the current one, I could show how much time is left until the end of the download.
User avatar
salvadordf
Posts: 4016
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: ICEFDownloadItem.EndTime

Post by salvadordf »

ICEFDownloadItem.EndTime is a standard TDateTime value but EndTime is used for downloads only, not for uploads.

If you need to show an estimated time of arrival you can calculate it with the start time and the amount of data transmitted at any given time.
7bit
Posts: 4
Joined: Sat Jun 26, 2021 11:43 am

Re: ICEFDownloadItem.EndTime

Post by 7bit »

Sorry for my english. I need to know the download end time. I understand that this is a DateTime value. But I don't understand how to use it. Is that why this property only returns the date? In theory, there should be both date and time.
User avatar
salvadordf
Posts: 4016
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: ICEFDownloadItem.EndTime

Post by salvadordf »

TDateTime has a date and a time but, according to the CEF documentation EndTime will give a meaningful result after the download has already ended.

You can calculate an estimated time of arrival for downloads too with the same method I commented before.
7bit
Posts: 4
Joined: Sat Jun 26, 2021 11:43 am

Re: ICEFDownloadItem.EndTime

Post by 7bit »

Ahh. I finally figured it out. This property is not what I thought. Thank you!
Post Reply