MuTime icon indicating copy to clipboard operation
MuTime copied to clipboard

Library gets time but is not saved nor persistent

Open agforte opened this issue 4 years ago • 0 comments

When the application first starts it says:

W/Persistence: not providing a Context to access SharedPreferences disables most of Persistence's features!
I/Persistence: instance:com.medavox.library.mutime.Persistence@be0eb7b
W/Persistence: no time data in memory, attempting to retrieve from SharedPreferences...
E/Persistence: Time Data was found to be invalid when checked! stored clock offset: 1020; stored uptime offset: 1587744810916; live clock: 1588274998296; live uptime: 46205117; Stored Clock difference: 1587744809896; live Clock difference: 1588228793178

then it tries to get time from network:

I/Ntp: Getting the time from 8 IP addresses: [time.google.com/216.239.35.12, pool.ntp.org/162.159.200.123, time.google.com/216.239.35.8, pool.ntp.org/193.29.63.150, time.google.com/216.239.35.4, pool.ntp.org/23.31.21.163, pool.ntp.org/66.228.59.187, time.google.com/216.239.35.0]...

After many NTP poll timeouts (?) the library finally gets the time:

Ntp: got time data "TimeData [Round Trip Delay: 62; System Clock offset: 184; Device Uptime offset: 1588228793362]" from 23.31.21.163

However, the next time I try to get the time from the library I get:

W/Persistence: no time data in memory, attempting to retrieve from SharedPreferences...
W/MuTime: Could not get current time.

and then after many of such lines above I get:

 W/System: A resource failed to call close. 
 I/chatty: uid=10135(com.cyphme.cyph) FinalizerDaemon identical 13 lines
 W/System: A resource failed to call close. 
 W/System: A resource failed to call close. 
 W/Persistence: no time data in memory, attempting to retrieve from SharedPreferences...
 W/MuTime: Could not get current time.
 W/System: A resource failed to call close. 
 I/chatty: uid=10135(com.cyphme.cyph) FinalizerDaemon identical 6 lines
 W/System: A resource failed to call close. 
 W/System: A resource failed to call close. 
 W/System: A resource failed to call close. 
 W/Persistence: no time data in memory, attempting to retrieve from SharedPreferences...
 W/MuTime: Could not get current time.

It looks pretty messy. Anybody has any idea on what's happening here? Thanks.

agforte avatar Apr 30 '20 19:04 agforte