Java Nano Second Convert nanoSecondsToSeconds(final long nanoSeconds)

Here you can find the source of nanoSecondsToSeconds(final long nanoSeconds)

Description

Reduces nanosecond time to seconds.

License

Open Source License

Parameter

Parameter Description
nanoSeconds as input.

Return

nanoSeconds to seconds.

Declaration

public static long nanoSecondsToSeconds(final long nanoSeconds) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    private static final int NANO_TIME_DIVIDER = 1000 * 1000 * 1000;

    /**//  w  w w . j  a  v a 2 s .com
     * Reduces nanosecond time to seconds.
     *
     * @param nanoSeconds as input.
     * @return nanoSeconds to seconds.
     */
    public static long nanoSecondsToSeconds(final long nanoSeconds) {
        return nanoSeconds / NANO_TIME_DIVIDER;
    }
}

Related

  1. humanReadableNanoseconds(long delta)
  2. microSecondToStr(int nanos, int meta)
  3. nano()
  4. nano2milli(double nano)
  5. nanoSeconds(long millis)
  6. nanosecondsToSeconds(Long nanoseconds)
  7. nanosecondsToString(long ns)
  8. nanoSecondToSecond(double nano, int decimal)
  9. nanoSecToString(final long nS)