I need to identify if the device is rebooted. Currently saving time in the database, and periodically check time interval from last boot using the following code as suggeste