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 193 forks source link

Why do we need to put TrueTime initialization inside of the class that extends application? #122

Open safa007 opened 5 years ago

safa007 commented 5 years ago

I have a use case where I can't put the TrueTime initialization inside of onCreate of the class that extends application. It seems to work fine when I put it outside of this class.

Is the reason why we shouldn't place the initialization outside of this onCreate method that we'd be re-calling some sort of sync function which would exponentially increase network calls? Or is there some other sort of reason?