You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the cacheExpirationMs is 1 minute and minWaitTimeBetweenSyncMs is 5 minutes, what will happen when I do a getCurrentTime() at minute 3? Will the value in the cache be used even though it is expired, will a sync be forced even though it still has 2 minutes left or will it just use the local device time?
The text was updated successfully, but these errors were encountered:
By the look of the code, even if the last update is out of date, it'll still wait for the 5 minutes to expire before starting a new sync.
The way this library works is by keeping in memory the difference between the local device time and the server time. Whenever you call getCurrentTime(), it will use this difference to return ASAP in a non blocking way, and will request a sync in the background if needed to ensure the difference is still accurate.
If the
cacheExpirationMs
is 1 minute andminWaitTimeBetweenSyncMs
is 5 minutes, what will happen when I do agetCurrentTime()
at minute 3? Will the value in the cache be used even though it is expired, will a sync be forced even though it still has 2 minutes left or will it just use the local device time?The text was updated successfully, but these errors were encountered: