Monday, May 7, 2018

java - How can I know how much time has passed between two operations in my app?

I'm working on an Android app and I have this problem.



For example, if I delete a file (operation A) and I receive a new file (operation B), I want to know how much time has passed between the two operations. I want it to work also if, in between, the user changes the date of the system, turns off the internet or restarts the device.



I know that exists SystemClock.elapsedRealtime() but its value restarts from zero if the user restarts the device.



I cannot use System.currentTimeMillis() because it changes if user changes the date.



I cannot get a date from the internet.




Thanks

No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...