May 12th, 2015

How does Task Manager compute Up Time, and why doesn't it agree with GetTickCount?

Task Manager shows a piece of information called “Up time”. How is this value calculated, and why doesn’t it agree with the value reported by Get­Tick­Count/Get­Tick­Count64? Task Manager calculates “up time” by subtracting the system boot time from the current time. In other words, it is misnamed; it really should be called time since system was started. It doesn’t subtract out the time when the computer was in sleep or hibernation.

The tick count, on the other hand, counts only time that elapses while the computer is on.

Author

Raymond has been involved in the evolution of Windows for more than 30 years. In 2003, he began a Web site known as The Old New Thing which has grown in popularity far beyond his wildest imagination, a development which still gives him the heebie-jeebies. The Web site spawned a book, coincidentally also titled The Old New Thing (Addison Wesley 2007). He occasionally appears on the Windows Dev Docs Twitter account to tell stories which convey no useful information.

0 comments

Discussion are closed.