Meaning of "system up time"

delphi package - automated exception handling
Post Reply
JDouble
Posts: 4
Joined: Fri Oct 30, 2009 4:08 pm

Meaning of "system up time"

Post by JDouble »

Hello,
what exactly does "system up time" mean in the madexcept protocol?
Does the Windows hibernation mode play a role?

We often see long periods of many days in the madexcept logs.
Are the computers really running continuously?
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: Meaning of "system up time"

Post by madshi »

Good question, I've no idea. I'm using GetTickCount64. The official MS documentation says this:
Retrieves the number of milliseconds that have elapsed since the system was started.
Was this means exactly I don't know. Here's what ChatGPT says, but I don't know if it's true, it lies a lot:
Suspending a PC does not reset the GetTickCount64 function.

The GetTickCount64 function retrieves the number of milliseconds that have elapsed since the system was started. It is not affected by suspending or hibernating the computer. The function continues to count the elapsed time from the system's startup, even if the computer is suspended and then resumed.

Therefore, when you call GetTickCount64 after resuming the PC from suspension, it will provide the elapsed time since the system was started, including the time spent while the PC was suspended.
iconic
Site Admin
Posts: 1065
Joined: Wed Jun 08, 2005 5:08 am

Re: Meaning of "system up time"

Post by iconic »

GetTickCount()/GetTickCount64() is not process or thread-based, it simply counts the CPU ticks (clock ticks) since the system booted. OS Suspension/Hibernation has absolutely no effect on the API whatsoever.

--Iconic
Post Reply