Java Sleep sleepNoShit(long nanos)

Here you can find the source of sleepNoShit(long nanos)

Description

sleep No Shit

License

BSD License

Declaration

public static void sleepNoShit(long nanos) 

Method Source Code

//package com.java2s;
/**//  w  w w.ja v a  2  s .  co m
 * This class is part of JCodec ( www.jcodec.org ) This software is distributed
 * under FreeBSD License
 * 
 * @author The JCodec project
 * 
 */

public class Main {
    public static void sleepNoShit(long nanos) {
        if (nanos < 0)
            return;
        try {
            Thread.sleep(nanos / 1000000, (int) (nanos % 1000000));
        } catch (InterruptedException e) {
        }
    }
}

Related

  1. sleepMs(final int millis)
  2. sleepMSInChunks(long ms)
  3. sleepNanos(final long nanoDuration)
  4. sleepNanos(long nanoseconds)
  5. sleepNoException(int ms)
  6. sleepNotException(long millis)
  7. sleepNoThrow(long timeoutMs)
  8. sleepNs(int ns)
  9. sleepNS(long ns)