System Up Time

Hello,

Is it possible to get the system up time (time from last device boot) programatically?

Thank you

Regards,
Vlastimil

The GetTickCount() function retrieves the number of milliseconds since last boot.

Please note that the tick count will roll over if the system is run continuously for 49.7 days.

Hello Alex,

Yes I am aware about the GetTickCount() and also the limitation. Anyway we have to be able to track more than 49.7 days. Maybe the QueryPerformanceCounter could be the answer. Can I rely on the fact it is always initialized to zero once the device is rebooted?

Regards

Vlastimil