mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-24 10:51:27 +01:00
Make build deprecation more resilient to clock skew.
This commit is contained in:
committed by
Alex Hart
parent
f572eb5322
commit
3ff218f9c6
@@ -202,6 +202,12 @@ internal class MiscellaneousValues internal constructor(store: KeyValueStore) :
|
||||
*/
|
||||
val lastKnownServerTimeOffset by longValue(SERVER_TIME_OFFSET, 0)
|
||||
|
||||
/**
|
||||
* An estimate of the server time, based on the last-known server time offset.
|
||||
*/
|
||||
val estimatedServerTime: Long
|
||||
get() = System.currentTimeMillis() - lastKnownServerTimeOffset
|
||||
|
||||
/**
|
||||
* The last time (using our local clock) we updated the server time offset returned by [.getLastKnownServerTimeOffset]}.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user