Java Milliseconds roundMillisWithSecondPrecision(long l)

Here you can find the source of roundMillisWithSecondPrecision(long l)

Description

round Millis With Second Precision

License

Apache License

Declaration

public static long roundMillisWithSecondPrecision(long l) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static long roundMillisWithSecondPrecision(long l) {
        return Math.round(((double) l) / 1000) * 1000;
    }/*w  ww  . ja  v  a  2s.co m*/
}

Related

  1. resetHourMinSecMill(final Date date)
  2. resetMilliseconds(long msec)
  3. reverseTimeMillis(long currentTimeMillis)
  4. rollMockClockMillis(long millis)
  5. roundMicrosToMillis(String micros)
  6. roundTimeToTheNearestSecondInMilliseconds(long timeInMilliseconds)
  7. safeSleepMillis(long milliseconds)
  8. samples2millis(long samples, double sampleRate)
  9. samplesToMilliseconds(int sampleRate, int samples)