Here you can find the source of currentMillisFromNanotime()
public static final long currentMillisFromNanotime()
//package com.java2s; //License from project: Apache License import java.util.concurrent.TimeUnit; public class Main { /**// w w w . j av a 2 s. c om * {@link System#nanoTime()} is less expensive than {@link System#currentTimeMillis()} and better suited * to measure time intervals. It's NOT suited to know the current time, for example to be compared * with the time of other nodes. * @return the value of {@link System#nanoTime()}, but converted in Milliseconds. */ public static final long currentMillisFromNanotime() { return TimeUnit.MILLISECONDS.convert(System.nanoTime(), TimeUnit.NANOSECONDS); } }