Java Milliseconds getMillisPartFromNanos(long nanos)

Here you can find the source of getMillisPartFromNanos(long nanos)

Description

getMillisPartFromNanos.

License

Open Source License

Parameter

Parameter Description
nanos a parameter

Declaration

public static long getMillisPartFromNanos(long nanos) 

Method Source Code

//package com.java2s;

public class Main {
    /** {@link int} The ONE_MILLION. */
    public static final int ONE_MILLION = 1000000;

    /**//from  w w  w.  ja v a 2  s  . c  om
     * getMillisPartFromNanos.
     * 
     * @param nanos
     * @return
     */
    public static long getMillisPartFromNanos(long nanos) {
        return nanos > 999999 ? nanos / ONE_MILLION : 0;
    }
}

Related

  1. getMilliseconds(String time)
  2. getMilliseconds(String unixtime)
  3. getMillisecondsFromTimeString(String timeString)
  4. getMilliSecs()
  5. getMillisFromByteArray(byte[] buff, int offset)
  6. getMillisSinceInit()
  7. getNumSamplesForMillisAtSampleRate(final int sampleRate, final float millis)
  8. getOLEDateFromMillisRounded(long millis)
  9. getPeriodDurationInMillis(int period)