Tech Off Thread

3 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

How to log Windows Phone 8 precise boot time and shutdown in an application?

Back to Forum: Tech Off
  • User profile image


    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.


    Please suggest!



  • User profile image

    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.

  • User profile image

    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!

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.