public boolean waitForNewTimeslot() throws InterruptedException {
		
		boolean hasWaited = false;
		
		while(true) {
			final long numberOfEventsInTimeSlot = getNumberOfEventsInTimeslot();
			
			if(numberOfEventsInTimeSlot > numberOfEvents) {
				hasWaited = true;
				Thread.sleep(timeslotInMilliseconds / 10);
			} else {
				return hasWaited;
			}
		}
	}
public boolean waitForNewTimeslot ( ) throws InterruptedException { boolean hasWaited = false ; while ( true ) { final long numberOfEventsInTimeSlot = getNumberOfEventsInTimeslot ( ) ; if ( numberOfEventsInTimeSlot > numberOfEvents ) { hasWaited = true ; Thread . sleep ( timeslotInMilliseconds / 10 ) ; } else { return hasWaited ; } } }
Wait for a new timeslot
@return
@throws InterruptedException