MCPcopy Create free account
hub / github.com/ReadyTalk/avian / sleep

Method sleep

classpath/java/lang/Thread.java:161–173  ·  view source on GitHub ↗
(long milliseconds)

Source from the content-addressed store, hash-verified

159 }
160
161 public static void sleep(long milliseconds) throws InterruptedException {
162 if (milliseconds <= 0) {
163 milliseconds = 1;
164 }
165
166 Thread t = currentThread();
167 if (t.sleepLock == null) {
168 t.sleepLock = new Object();
169 }
170 synchronized (t.sleepLock) {
171 t.sleepLock.wait(milliseconds);
172 }
173 }
174
175 public static void sleep(long milliseconds, int nanoseconds)
176 throws InterruptedException

Callers 5

runMethod · 0.95
runMethod · 0.95
runMethod · 0.95
runMethod · 0.95
sleepMethod · 0.95

Calls 2

currentThreadMethod · 0.95
waitMethod · 0.45

Tested by 3

runMethod · 0.76
runMethod · 0.76
runMethod · 0.76