instacart / truetime-android

Android NTP time library. Get the true current time impervious to device clock time changes
https://tech.instacart.com/truetime/
Apache License 2.0
1.42k stars 194 forks source link

SntpClient move _sntpInitialized from boolean->AtomicBoolean to keep wasInitialized() from blocking #79

Closed cmagnuson closed 6 years ago

cmagnuson commented 6 years ago

Have wasInitialized() depend on an AtomicBoolean so it won't block when SntpClient is locked during initialization

kaushikgopal commented 6 years ago

Thanks for the suggestion and apologies for replying so late. I actually have had a branch kg/fix/sync_to_atomic for sometime that did this. Was just terrible at not merging that faster.

I'm putting up a PR shortly and about to merge those changes.