832 |
public static void sleep(long ms, int ns) throws InterruptedException |
public static void sleep(long ms, int ns) throws InterruptedException |
833 |
{ |
{ |
834 |
// Check parameters |
// Check parameters |
835 |
if (ms < 0 || ns < 0 || ns > 999999) |
if (ms < 0 ) |
836 |
throw new IllegalArgumentException(); |
throw new IllegalArgumentException("Negative milliseconds: " + ms); |
837 |
|
|
838 |
|
if (ns < 0 || ns > 999999) |
839 |
|
throw new IllegalArgumentException("Nanoseconds ouf of range: " + ns); |
840 |
|
|
841 |
// Really sleep |
// Really sleep |
842 |
VMThread.sleep(ms, ns); |
VMThread.sleep(ms, ns); |