Android.Location.toString() 对 `et` 的解释

Android.Location.toString() interpretation of `et`

当我在 Location 对象上使用 .toString() 方法时,我得到如下结果:

Location[gps 01.234567,12.234567 
         acc=14 
         et=+2d23h36m34s870ms 
         alt=123.0 
         vel=0.0 
         {Bundle[mParcelledData.dataSize=40]}
         ]

(我添加了换行符以提高可读性)

我猜(经过这里的一些研究:link):


但是et=+2d23h36m34s870ms是什么?

根据 javadocs:

/** * Return the time of this fix, in elapsed real-time since system boot. * *

This value can be reliably compared to * {@link android.os.SystemClock#elapsedRealtimeNanos}, * to calculate the age of a fix and to compare Location fixes. This * is reliable because elapsed real-time is guaranteed monotonic for * each system boot and continues to increment even when the system * is in deep sleep (unlike {@link #getTime}. * *

All locations generated by the {@link LocationManager} * are guaranteed to have a valid elapsed real-time. * * @return elapsed real-time of fix, in nanoseconds since system boot. */

public long getElapsedRealtimeNanos() {
    return mElapsedRealtimeNanos;
}

toStringet

相关的代码
if (mElapsedRealtimeNanos == 0) {
    s.append(" et=?!?");
} else {
    s.append(" et=");
    TimeUtils.formatDuration(mElapsedRealtimeNanos / 1000000L, s);
}

顺便说一句,它的意思可能是距离上次更新位置已经过去了多长时间