I want to write an application for Windows Phone 8 which can display how much time did the phone took to boot every time. Even want to log time taken for last shutdown. Can some one suggest how this can be done in an application. Basically I want to log
Boot time from power button press till the tiled home screen appears.
Also Shutdown time from when user initiates power button shutdown till display goes off.
If you want to actually log system startup and shutdown - you can't. This is impossible for a userland program, and wouldn't be a reliable figure if from a driver component because the kernel would load/unload the driver after/before itself.
The only other suggestion I can make is by looking at events in the Event Log, but I don't know how that works on Windows Phone.
Getting information on system uptime can be done using the WMI Performance Counters (exposed via the System.Diagnostics.PerformanceCounter class in .NET, which is not available on Windows Phone). You'd want to look for specific counters in the WMI System namespace
Windows Phone 8, based on NT, should have WMI somewhere in the system, but my few searches haven't found anything relevant.
Thanks you. Can you point me to WMI counters that I have to look for (desktop OS point of view), so that I will try to search if they are present in Windows phone 8? Question here is when are these counters start counting, after windows Kernel starts? or after power button press, which I am looking for? I tried using GetTickCount() windows API in native app, but this did not measure time from power button press!
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.