How to retain the timer value of Chronometer even if device restart again

I want to start a timer and that timer will remain start unless or until next day comes. Once solution which I come across that I store value of SystemClock.elapsedRealtime() in shared preferences and when ever user open the device I set base of Choronometer like this :


it works perfectly fine whenever user open application, close application or even if user kill application , problem occure when user restart the device. By restarting device it shows very anonymous and large values. Normal values are shown like this


But when the problem occurs when I restart the device values are shown like this