Windows xác định lượng thời gian cần thực hiện hành động bằng một tệp như thế nào?

Mục lục:

Windows xác định lượng thời gian cần thực hiện hành động bằng một tệp như thế nào?
Windows xác định lượng thời gian cần thực hiện hành động bằng một tệp như thế nào?

Video: Windows xác định lượng thời gian cần thực hiện hành động bằng một tệp như thế nào?

Video: Windows xác định lượng thời gian cần thực hiện hành động bằng một tệp như thế nào?
Video: Thử Bỏ Windows Để Chuyển Qua Dùng LINUX - YouTube 2024, Tháng tư
Anonim
Ước tính 'thời gian còn lại' trên Windows là đủ để khiến mọi người phát điên, nhưng bạn đã bao giờ tự hỏi Windows xác định thời gian như thế nào? Bài đăng Hỏi & Đáp của SuperUser hôm nay có một số câu trả lời cho câu hỏi tò mò, nhưng thất vọng, của người đọc.
Ước tính 'thời gian còn lại' trên Windows là đủ để khiến mọi người phát điên, nhưng bạn đã bao giờ tự hỏi Windows xác định thời gian như thế nào? Bài đăng Hỏi & Đáp của SuperUser hôm nay có một số câu trả lời cho câu hỏi tò mò, nhưng thất vọng, của người đọc.

Phiên Hỏi & Đáp hôm nay đến với chúng tôi theo lịch sự của SuperUser - một phân khu của Stack Exchange, một nhóm các trang web Hỏi & Đáp do cộng đồng điều hành.

Windows 8.1 chuyển ảnh chụp màn hình cửa sổ lịch sự của im thực sự famecore.

Câu hỏi

Người đọc siêu người dùng ‘im thực sự famecore’ muốn biết cách Windows xác định lượng thời gian cần thiết để thực hiện thao tác với một tệp:

I wanted to know if there is an equation that Windows uses to determine how long it takes to perform an action with a file such as: deleting, copying, erasing, or installing.

Image
Image

For example, when I delete a file and Windows says Time remaining: 18 seconds, how is it calculating this number, and what does it use to calculate it?

Windows có sử dụng một phương trình đặc biệt để xác định thời gian còn lại để thực hiện một hoạt động hay không, hoặc nó chỉ cung cấp ước tính 'phỏng đoán tốt nhất'?

Câu trả lời

Những người đóng góp của SuperUser Valmiky Arquissandas và Richard có câu trả lời cho chúng tôi. Đầu tiên, Valmiky Arquissandas:

Have you noticed that it usually does not give you any estimates during the first few seconds?

That is because during the first few seconds, it just does the operation it has to do. Then, after a short amount of time, it knows how much it has already copied/deleted/etc, and how long it took. That gives you the average speed of the operation.

Then, divide the remaining bytes by the speed, and you have the time it will take to complete the operation.

This is elementary school math. If you want to travel 360 km, and at the end of the first minute you have traveled 1 km, how long will it take you to reach your destination?

Well, the speed is 1 km/minute, so that is 60 km/hour. 360 km divided by 60 km/hour gives you an estimated time of 6 hours (or 360 km / 1 km/minute = 360 minutes = 6 hours). Since you have already traveled for one minute, then the estimated time left is 5 hours and 59 minutes.

Substitute travel with copy, km with bytes, and that answers your question.

Different systems have different ways of estimating time. You can take the last minute and the estimates may vary wildly. Or you can take the full time, and if the speed actually changes permanently, your estimates may be far removed from reality. What I described is the simplest method.

Tiếp theo là câu trả lời từ Richard:

If you are interested, this question tells you how Windows and OSX formats the time left into the progress bar once it has an idea how long it has remaining.

When shortening time expressions in progress dialogs, should they be rounded up or down?

Raymond Chen, a developer on the Windows team at Microsoft, confirms this algorithm (see Valmiky’s answer above) in a posting on his blog. He also explains why it can be wrong.

Why does the copy dialog give such horrible estimates?

Có cái gì để thêm vào lời giải thích? Tắt âm thanh trong các ý kiến. Bạn muốn đọc thêm câu trả lời từ những người dùng Stack Exchange có hiểu biết công nghệ khác? Xem toàn bộ chuỗi thảo luận tại đây.

Đề xuất: