I have Chronometer in my app, that counts game elapsed time.
I have save function on exit.
I need to save time from chronometer, and to display same time when I load game after.
In save function I save chronometer.getBase() value.
In load function I get that value and setBase() on chronometer.
But that’s not the right time, it seems that chronometer keeps ticking while app is closed.
How to do this?
It seem that getBase isn’t right value for my purpose.
I found a solution.
In the save function I store the value via this method:
And in the load function I refresh the chronometer like this:
Hope this will help somebody someday. Cheers!