Partager via


Location.ElapsedRealtimeNanos Property

Definition

Return the time of this fix in nanoseconds of elapsed realtime since system boot. -or- Set the time of this location in nanoseconds of elapsed realtime since system boot.

public virtual long ElapsedRealtimeNanos { [Android.Runtime.Register("getElapsedRealtimeNanos", "()J", "GetGetElapsedRealtimeNanosHandler")] get; [Android.Runtime.Register("setElapsedRealtimeNanos", "(J)V", "GetSetElapsedRealtimeNanos_JHandler")] set; }
[<get: Android.Runtime.Register("getElapsedRealtimeNanos", "()J", "GetGetElapsedRealtimeNanosHandler")>]
[<set: Android.Runtime.Register("setElapsedRealtimeNanos", "(J)V", "GetSetElapsedRealtimeNanos_JHandler")>]
member this.ElapsedRealtimeNanos : int64 with get, set

Property Value

elapsed realtime of this location in nanoseconds

Attributes

Remarks

Property getter documentation:

Return the time of this fix in nanoseconds of elapsed realtime since system boot.

This value can be compared with android.os.SystemClock#elapsedRealtimeNanos to reliably order or compare locations. This is reliable because elapsed realtime is guaranteed to be monotonic and continues to increment even when the system is in deep sleep (unlike #getTime). However, since elapsed realtime is with reference to system boot, it does not make sense to use this value to order or compare locations across boot cycles or devices.

All locations generated by the LocationManager are guaranteed to have a valid elapsed realtime set.

Java documentation for android.location.Location.getElapsedRealtimeNanos().

Property setter documentation:

Set the time of this location in nanoseconds of elapsed realtime since system boot.

Java documentation for android.location.Location.setElapsedRealtimeNanos(long).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to