Here you can find the source of toMilliseconds(long nanoseconds)
Parameter | Description |
---|---|
nanoseconds | a parameter |
public static double toMilliseconds(long nanoseconds)
//package com.java2s; public class Main { public static final double NANOSECONDS_PER_MILLISECONDS = 1000000, MILLISECONDS_PER_SECONDS = 1000, SECONDS_PER_HOUR = 3600;//from w w w. java 2 s . c o m /** * Converts nanoseconds to milliseconds * @param nanoseconds */ public static double toMilliseconds(long nanoseconds) { return toMilliseconds((double) nanoseconds); } /** * Converts nanoseconds to milliseconds * @param nanoseconds */ public static double toMilliseconds(double nanoseconds) { return nanoseconds / NANOSECONDS_PER_MILLISECONDS; } }