Java tutorial
//package com.java2s; public class Main { private static long TIME_OFFSET = System.nanoTime(); public static long getTime() { return System.nanoTime() - TIME_OFFSET; } }