public static void nanosleep(long nanos) throws InterruptedException {
  if (Thread.interrupted())   throw new InterruptedException();
  if (nanos <= 0) {
    return;
  }
  if (nanos >= 1000000) {
    Thread.sleep(nanos / 1000000,(int)(nanos % 1000000));
  }
 else {
    if (pureMode) {
      Thread.yield();
    }
 else {
      _nanosleep((int)nanos);
    }
  }
}

public static void nanosleep ( long nanos ) throws InterruptedException { if ( Thread . interrupted ( ) ) throw new InterruptedException ( ) ; if ( nanos <= 0 ) { return ; } if ( nanos >= 1000000 ) { Thread . sleep ( nanos / 1000000 , ( int ) ( nanos % 1000000 ) ) ; } else { if ( pureMode ) { Thread . yield ( ) ; } else { _nanosleep ( ( int ) nanos ) ; } } }
sleeps for the specified number of nanoseconds .
