Java TimeUnit Usage sleepForSeconds(int seconds)

Here you can find the source of sleepForSeconds(int seconds)

Description

sleep For Seconds

License

Apache License

Declaration

public static void sleepForSeconds(int seconds) 

Method Source Code

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

import java.util.concurrent.TimeUnit;

public class Main {
    public static void sleepForSeconds(int seconds) {
        try {/* ww w.  j ava2 s.co m*/
            Thread.sleep(TimeUnit.SECONDS.toMillis(seconds));
        } catch (InterruptedException ignored) {
        }
    }
}

Related

  1. sleep()
  2. sleep(int millis)
  3. sleep(long durationMillis)
  4. sleep(long millis)
  5. sleep(long milliseconds)
  6. sleepMilliseconds(long milliseconds)
  7. sleepNanos(long nanoDuration)
  8. sleepNanos(long nanoDuration)
  9. sleepQuietly(int seconds)