Hogyan határozza meg a Windows a File művelet végrehajtásához szükséges idő mennyiségét?

Tartalomjegyzék:

Hogyan határozza meg a Windows a File művelet végrehajtásához szükséges idő mennyiségét?
Hogyan határozza meg a Windows a File művelet végrehajtásához szükséges idő mennyiségét?

Videó: Hogyan határozza meg a Windows a File művelet végrehajtásához szükséges idő mennyiségét?

Videó: Hogyan határozza meg a Windows a File művelet végrehajtásához szükséges idő mennyiségét?
Videó: How to Install & Change Desktop Environments in Ubuntu ? | Gnome , KDE , XFCE | - YouTube 2024, Április
Anonim
A "hátralevő idő" becslések Windows-ra elegendőek ahhoz, hogy időnként bárkit is őrjöngessenek, de vajon elgondolkozott-e már arról, hogy a Windows hogyan határozza meg ezeket az időt? A mai SuperUser Q & A hozzászólásnak néhány válasza van a kíváncsi, mégis frusztrált olvasó kérdésére.
A "hátralevő idő" becslések Windows-ra elegendőek ahhoz, hogy időnként bárkit is őrjöngessenek, de vajon elgondolkozott-e már arról, hogy a Windows hogyan határozza meg ezeket az időt? A mai SuperUser Q & A hozzászólásnak néhány válasza van a kíváncsi, mégis frusztrált olvasó kérdésére.

A mai Kérdések és válaszok munkamenetét a SuperUser - a Stack Exchange, a Q & A weboldalak közösség által irányított csoportosulásának részlegével - köszönheti.

Windows 8.1 fájl átviteli ablak screenshot jóvoltából im igazán famecore.

A kérdés

A SuperUser olvasó "im really famecore" azt szeretné tudni, hogy a Windows meghatározza, mennyi időt vesz igénybe egy művelet egy fájllal:

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?

A Windows egy speciális egyenletet használ a mûvelet végrehajtásához szükséges hátralévõ idõ meghatározásához, vagy csak a "legjobb becslés" becsléshez?

A válasz

A SuperUser-munkatársaknak, Valmiky Arquissandasnak és Richardnak van a választ számunkra. Először fel, 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.

Ezt követte Richard válasz:

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?

Van valami a magyarázathoz? Hangzik ki a megjegyzésekben. Szeretne többet válaszolni a többi technikus-tudós Stack Exchange felhasználóiról? Nézze meg a teljes vitafonalat itt.

Ajánlott: