Cache api
Sometimes it is necessary to get accurate time (or null) without starting automatic synchronization. If time synchronization depends on user actions, re-run can be cancelled. The listener is inconvenient to use when time is requested from several places. The documentation was misleading, in reality it was not possible to get accurate time without synchronization with the server. See issues #36.
⚠️ This change breaks backward compatibility with KronosClock interface. Now its documentation is clear.
@arturdryomov, anyone?
Hello there. I’m definitely not the POC on this project, I’ll find someone who is.
From my POV — it’s always better to avoid breaking the API. In this particular scenario it might be better to change the documentation instead. An additional method can be introduced to do the task. You want something similar to getLastLocation, right?
Yes, getCachedNtpTimeMs behaves like getLastLocation.