Java tutorial
//package com.java2s; //License from project: Apache License public class Main { public static long durationInMillis(long startNano) { final long endNano = System.nanoTime(); return (endNano - startNano) / 1000000; } }