Package com.diozero.util
Class SleepUtil
- java.lang.Object
-
- com.diozero.util.SleepUtil
-
public class SleepUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description SleepUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static void
busySleep(long nanos)
static void
main(String[] args)
static void
sleepMicros(int micros)
Deprecated.static void
sleepMillis(long millis)
Sleep for the specific number of millisecondsstatic void
sleepNanos(int nanos)
Deprecated.static void
sleepSeconds(double secs)
Sleep for the specific number of secondsstatic void
sleepSeconds(int secs)
Sleep for the specific number of seconds
-
-
-
Field Detail
-
MS_IN_SEC
public static final int MS_IN_SEC
- See Also:
- Constant Field Values
-
US_IN_SEC
public static final long US_IN_SEC
- See Also:
- Constant Field Values
-
NS_IN_SEC
public static final long NS_IN_SEC
- See Also:
- Constant Field Values
-
NS_IN_US
public static final int NS_IN_US
- See Also:
- Constant Field Values
-
US_IN_MS
public static final int US_IN_MS
- See Also:
- Constant Field Values
-
NS_IN_MS
public static final long NS_IN_MS
- See Also:
- Constant Field Values
-
-
Method Detail
-
sleepSeconds
public static void sleepSeconds(int secs)
Sleep for the specific number of seconds- Parameters:
secs
- Number of seconds to sleep for
-
sleepSeconds
public static void sleepSeconds(double secs)
Sleep for the specific number of seconds- Parameters:
secs
- Number of seconds to sleep for
-
sleepMillis
public static void sleepMillis(long millis)
Sleep for the specific number of milliseconds- Parameters:
millis
- Number of milliseconds to sleep for
-
sleepMicros
@Deprecated public static void sleepMicros(int micros)
Deprecated.Sleep for the specific number of microseconds- Parameters:
micros
- Number of microseconds to sleep for
-
sleepNanos
@Deprecated public static void sleepNanos(int nanos)
Deprecated.Sleep for the specified number of nanoseconds.- Parameters:
nanos
- Number of nanoseconds
-
busySleep
public static void busySleep(long nanos)
-
main
public static void main(String[] args)
-
-