code: public void sleep(int milliseconds) {
  		long target = getTime()+milliseconds;
  		while (getTime() < target) {
  			try { Thread.sleep(1); } catch (Exception e) {}
  		}
  	}
docs: Sleep for a given period
  
  @param milliseconds The period to sleep for in milliseconds