mirror of
https://github.com/corda/corda.git
synced 2025-01-04 04:04:27 +00:00
21 lines
348 B
Java
21 lines
348 B
Java
|
package java.lang;
|
||
|
|
||
|
public class Thread implements Runnable {
|
||
|
private final Runnable task;
|
||
|
|
||
|
public Thread(Runnable task) {
|
||
|
this.task = task;
|
||
|
}
|
||
|
|
||
|
public native void start();
|
||
|
|
||
|
public void run() {
|
||
|
if (task != null) {
|
||
|
task.run();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public static native void sleep(long milliseconds)
|
||
|
throws InterruptedException;
|
||
|
}
|