Java TimeUnit Usage second(long second)

Here you can find the source of second(long second)

Description

second

License

Apache License

Declaration

public static void second(long second) 

Method Source Code


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

import java.util.concurrent.TimeUnit;

public class Main {
    public static void second(long second) {
        try {/*  ww w.j a v a 2s.  c  o m*/
            TimeUnit.SECONDS.sleep(second);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}

Related

  1. printTiming(long start, long end)
  2. randomNanos(Random rand, int decimalDigits)
  3. rangeOf(final Date date, final int beforeDates, final int afterDates)
  4. roundTimestampToNexDay(long timestamp)
  5. run(Callable task, long timeout)
  6. seconds(long timeInMillis)
  7. secondsFromNow(long seconds)
  8. secondsPassed(int startTime)
  9. secondsToETA(long secondsTotal)