-
- All Implemented Interfaces:
-
com.datadog.android.internal.time.TimeProvider
public final class DefaultTimeProvider implements TimeProvider
A TimeProvider implementation that provides the current device time as both device and server time. The offsets are always 0.
-
-
Constructor Summary
Constructors Constructor Description DefaultTimeProvider()
-
Method Summary
Modifier and Type Method Description LonggetDeviceTimestamp()Returns the current device timestamp in milliseconds. LonggetServerTimestamp()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. -
-
Method Detail
-
getDeviceTimestamp
Long getDeviceTimestamp()
Returns the current device timestamp in milliseconds.
-
getServerTimestamp
Long getServerTimestamp()
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.
-
-
-
-