Here you can find the source of toMillis(long nanos)
Parameter | Description |
---|---|
nanos | the number of nanoseconds |
public static final long toMillis(long nanos)
//package com.java2s; //License from project: Apache License public class Main { private static final long NS_TO_MS = 1000 * 1000; /**//from www.j av a2 s . co m * Convert the specified number of nanoseconds to number of milliseconds, ignoring the fractional part of the * result. * <p> * @param nanos the number of nanoseconds * @return the number of milliseconds */ public static final long toMillis(long nanos) { return nanos / NS_TO_MS; } }