@Test public void testCurrentTimeMicros() { long reference = System.currentTimeMillis(); long actual = Os.currentTimeMicros(); long delta = actual / 1000 - reference; Assert.assertTrue(delta < 200); }
public static native long currentTimeMicros();
Os { public static native long currentTimeMicros(); }
Os { public static native long currentTimeMicros(); private  Os(); }
Os { public static native long currentTimeMicros(); private  Os(); static native long currentTimeMicros(); static native long currentTimeNanos(); static native int errno(); static long forkExec(CharSequence args); static int forkExecPid(long forkExecT); static int forkExecReadFd(long forkExecT); static int forkExecWriteFd(long forkExecT); static byte[] generateKerberosToken(CharSequence spn); static native int getPid(); @SuppressWarnings("EmptyMethod") static void init(); static int setCurrentThreadAffinity(int cpu); }
Os { public static native long currentTimeMicros(); private  Os(); static native long currentTimeMicros(); static native long currentTimeNanos(); static native int errno(); static long forkExec(CharSequence args); static int forkExecPid(long forkExecT); static int forkExecReadFd(long forkExecT); static int forkExecWriteFd(long forkExecT); static byte[] generateKerberosToken(CharSequence spn); static native int getPid(); @SuppressWarnings("EmptyMethod") static void init(); static int setCurrentThreadAffinity(int cpu); static final int WINDOWS; static final int _32Bit; static final int type; static final int OSX; static final int LINUX_AMD64; static final int LINUX_ARM64; static final int FREEBSD; }