-
- All Implemented Interfaces:
-
ai.kubesense.android.internal.time.TimeProvider
public final class DefaultTimeProvider extends BaseTimeProvider
A TimeProvider implementation that provides the current device time as both device and server time. The offsets are always 0.
Device timestamp and elapsed time are inherited from BaseTimeProvider.
-
-
Constructor Summary
Constructors Constructor Description DefaultTimeProvider()
-
Method Summary
Modifier and Type Method Description LonggetServerTimestampMillis()Returns the current server timestamp in milliseconds. LonggetServerOffsetNanos()Returns the offset between the device and server time references in nanoseconds. LonggetServerOffsetMillis()Returns the offset between the device and server time references in milliseconds. -
Methods inherited from class ai.kubesense.android.internal.time.DefaultTimeProvider
getDeviceElapsedRealtimeMillis, getDeviceElapsedTimeNanos, getDeviceTimestampMillis -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getServerTimestampMillis
Long getServerTimestampMillis()
Returns the current server timestamp in milliseconds.
-
getServerOffsetNanos
Long getServerOffsetNanos()
Returns the offset between the device and server time references in nanoseconds.
-
getServerOffsetMillis
Long getServerOffsetMillis()
Returns the offset between the device and server time references in milliseconds.
-
-
-
-