Java TimeUnit Convert toMillis(long duration, TimeUnit timeUnit)

Here you can find the source of toMillis(long duration, TimeUnit timeUnit)

Description

to Millis

License

Open Source License

Declaration

public static long toMillis(long duration, TimeUnit timeUnit) 

Method Source Code

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

import java.util.concurrent.TimeUnit;

public class Main {
    public static long toMillis(long duration, TimeUnit timeUnit) {
        return TimeUnit.MILLISECONDS.convert(duration, timeUnit);
    }//w ww. ja  v a  2  s . co  m
}

Related

  1. timeToNanoSeconds(TimeUnit unit, long time)
  2. toIntervalFromNow(long timeback, TimeUnit unit)
  3. toMillis(Double sourceValue, TimeUnit sourceUnit)
  4. toMillis(final long interval, final TimeUnit tu)
  5. toMillis(int duration, TimeUnit unit)
  6. toMillis(long duration, TimeUnit unit)
  7. toMillis(long time, TimeUnit unit)
  8. toMillis(String timeUnitString, String timeValue)
  9. toNanos(long timeout, TimeUnit unit)