Java TimeUnit Convert convertToMillis(long waitTime, TimeUnit timeUnit)

Here you can find the source of convertToMillis(long waitTime, TimeUnit timeUnit)

Description

convert To Millis

License

Open Source License

Declaration

public static long convertToMillis(long waitTime, TimeUnit timeUnit) 

Method Source Code


//package com.java2s;
/*/*from   w  ww  .j  a  v a  2 s .c  om*/
 * Copyright (c) 2016 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
 * and is available at http://www.eclipse.org/legal/epl-v10.html
 */

import java.util.concurrent.TimeUnit;

public class Main {
    public static long convertToMillis(long waitTime, TimeUnit timeUnit) {
        return timeUnit.toMillis(waitTime);
    }
}

Related

  1. convert(long time, TimeUnit unitIn, TimeUnit unitOut)
  2. convert(TimeUnit unitTo, TimeUnit unitFrom, long cnt)
  3. convertReportingPeriod(long profilePeriod, TimeUnit profileTimeUnit, long reportingPeriod, TimeUnit reportingTimeUnit)
  4. convertTo(long a, TimeUnit from, TimeUnit to)
  5. convertToDouble(long fromTime, TimeUnit fromTimeUnit, TimeUnit toTimeUnit)
  6. convertToMilliseconds(TimeUnit timeUnit, long seed)
  7. convertToSecond(int interval, TimeUnit unit)
  8. durationToMillis(final long val, final TimeUnit unit)
  9. getDateRelativeToNow(TimeUnit timeUnit, long amount)