mirror of
https://github.com/corda/corda.git
synced 2024-12-29 09:18:58 +00:00
22 lines
382 B
Java
22 lines
382 B
Java
package java.lang;
|
|
|
|
public class Thread implements Runnable {
|
|
private final Runnable task;
|
|
private long peer;
|
|
|
|
public Thread(Runnable task) {
|
|
this.task = task;
|
|
}
|
|
|
|
public synchronized native void start();
|
|
|
|
public void run() {
|
|
if (task != null) {
|
|
task.run();
|
|
}
|
|
}
|
|
|
|
public static native void sleep(long milliseconds)
|
|
throws InterruptedException;
|
|
}
|