FileDocCategorySizeDatePackage
SystemClock_Delegate.javaAPI DocAndroid 5.1 API3085Thu Mar 12 22:22:44 GMT 2015android.os

SystemClock_Delegate

public class SystemClock_Delegate extends Object
Delegate implementing the native methods of android.os.SystemClock Through the layoutlib_create tool, the original native methods of SystemClock have been replaced by calls to methods of the same name in this delegate class. Because it's a stateless class to start with, there's no need to keep a {@link DelegateManager} around to map int to instance of the delegate.

Fields Summary
private static long
sBootTime
private static long
sBootTimeNano
Constructors Summary
Methods Summary
static longcurrentThreadTimeMicro()
Returns microseconds running in the current thread.

return
elapsed microseconds in the thread
hide

        return System.currentTimeMillis() * 1000;
    
static longcurrentThreadTimeMillis()
Returns milliseconds running in the current thread.

return
elapsed milliseconds in the thread

        return System.currentTimeMillis();
    
static longcurrentTimeMicro()
Returns current wall time in microseconds.

return
elapsed microseconds in wall time
hide

        return elapsedRealtime() * 1000;
    
static longelapsedRealtime()
Returns milliseconds since boot, including time spent in sleep.

return
elapsed milliseconds since boot.

        return System.currentTimeMillis() - sBootTime;
    
static longelapsedRealtimeNanos()
Returns nanoseconds since boot, including time spent in sleep.

return
elapsed nanoseconds since boot.

        return System.nanoTime() - sBootTimeNano;
    
static longuptimeMillis()
Returns milliseconds since boot, not counting time spent in deep sleep. Note: This value may get reset occasionally (before it would otherwise wrap around).

return
milliseconds of non-sleep uptime since boot.


                                        
    
    /*package*/    
        return System.currentTimeMillis() - sBootTime;