code: public void run() {
  		
  		while( running ) {
  			
  			long interval_end = System.currentTimeMillis() + interval;
  			
  			while( interval_end > System.currentTimeMillis() ) {
  				
  				Thread.yield();
  				
  			}
  			
  			fireIntervalElapsed();
  			
  		}
  		
  		running = false;
  		
  	}
docs: Main thread workflow.  Fires fireIntervalElapsed() each interval.