Here you can find the source of nanosToMillis(long l)
public static long nanosToMillis(long l)
//package com.java2s; //License from project: Apache License public class Main { private static final long nanosInMillisecond = 1000000L; public static long nanosToMillis(long l) { return Math.round(((double) l) / nanosInMillisecond); }/*from w w w . ja v a2 s . c o m*/ }