Почему Windows может показывать uptime больше реального?
Несколько дней назад надо было для одной поделки определить uptime машины програмно. Ну, задачка простейшая (GetTickCount[64]
), но результат оказался странный: хотя я машину включил утром, уверенно выводилось, что uptime больше суток, указывая на вчерашнее утро. Посмотрел — то же значение было и в окошке диспетчера задач.
Перегрузил - все нормально, правильные данные. Но стал следить.
Несколько дней показывало нормально, отрабатывая все выключения машины.
Вчера вечером, как обычно, выключил машину через "Завершение работы". Сегодня утром она мне говорит — работаю со вчерашнего утра!
Что это может быть? Какая-то гибернация, которую я не просил? Как убедиться?
Ответы (1 шт):
Это Hybrid-Boot. В двух последних ссылках есть примеры команд для измерения времени после последнего сна.
This is a known bug in Windows 10, it is caused by the Fast Startup process ...
Windows 10 is counter intuitive, when you shut your PC down, what happens is the state of your RAM is written to the Hard Drive, then when you Start your System again, that is read back into RAM from the hard drive, this results in faster startup times, it is roughly equivalent to the old Hibernate system in previous versions of Windows
Conversely when you restart your PC, it is actually shut down completely, and RAM is flushed, then Windows boots up to a clean version of Windows, which resets the up-time clock on your CPU ...
Why is the system uptime too long despite shutdown?:
If you use Windows 8+, Shutdown is actually logout and hibernate!
Windows 8 reports WRONG uptime (possibly total Hybrid-Boot uptime):
UPDATE: I disabled Hybrid-Boot and rebooted. It now results the right uptime. Also, doing a full shutdown with
shutdown /s /t 0
also works.