Android examples for Android OS:System Clock
elapsed Real Time Nanos
//package com.java2s; import android.annotation.TargetApi; import android.os.Build; import android.os.SystemClock; public class Main { @TargetApi(17)/*w ww.j av a 2 s .c o m*/ public static long elapsedRealTimeNanos() { if (Build.VERSION.SDK_INT >= 17) { return SystemClock.elapsedRealtimeNanos(); } return SystemClock.elapsedRealtime() * 1000000l; } }