final VmThreadProxy p = new VmThreadProxy(this, VmSystem .currentKernelMillis() + millis); sleepImpl(p);
final long wakeupTime = VmSystem.currentKernelMillis() + millis; final VmProcessor proc = VmProcessor.current(); proc.disableReschedule(true); this.wakeupTime = wakeupTime; this.threadState = ASLEEP; proc.getScheduler().addToSleepQueue(this);   proc.suspend(true);
    public final void sleep(long millis, int nanos) throws InterruptedException {        if (currentThread() != this) {            return;        }        if (threadState != RUNNING) {            return;        }        // Test interrupted status        if (this.interrupted) {            this.interrupted = false;            throw new InterruptedException();        }        final VmThreadProxy p = new VmThreadProxy(this, VmSystem                .currentKernelMillis()                + millis);        sleepImpl(p);        /* We're back alive */        testAndClearInterruptStatus();    }