Poll the streaming system

@param delta The amount of time passed since last poll (in milliseconds)
9967
public void poll(int delta) {
		if (!soundWorks) {
			return;
		}
		if (paused) {
			return;
		}

		if (music) {
			if (mod != null) {
				try {
					mod.poll();
				} catch (OpenALException e) {
					Log.error("Error with OpenGL MOD Player on this this platform");
					Log.error(e);
					mod = null;
				}
			}
			if (stream != null) {
				try {
					stream.update();
				} catch (OpenALException e) {
					Log.error("Error with OpenGL Streaming Player on this this platform");
					Log.error(e);
					mod = null;
				}
			}
		}
	}
811796
public void refresh(ExtensionComponentSet delta) {
        boolean fireOnChangeListeners = false;
        synchronized (getLoadLock()) {
            if (extensions==null)
                return;     // not yet loaded. when we load it, we'll load everything visible by then, so no work needed

            Collection<ExtensionComponent<T>> found = load(delta);
            if (!found.isEmpty()) {
                List<ExtensionComponent<T>> l = Lists.newArrayList(extensions);
                l.addAll(found);
                extensions = sort(l);
                fireOnChangeListeners = true;
            }
        }
        if (fireOnChangeListeners) {
            fireOnChangeListeners();
        }
    }
461491
@Override
	public E poll(long timeout, TimeUnit unit) throws InterruptedException {
		E e = queue.poll(timeout, unit);
		if (e != null){
			signalSizeReduced();
		}
		return e;
	}
276075
protected void gotPong (PongResponse pong)
    {
        // if we're not currently calculating our delta, then we can throw away the pong
        if (_dcalc != null) {
            // we update the delta after every receipt so as to immediately obtain an estimate of
            // the clock delta and then refine it as more packets come in
            _dcalc.gotPong(pong);
            _serverDelta = _dcalc.getTimeDelta();
        }
    }
565619
@Trivial
    protected void endTimings() {
        endTime = getTime();

        if (tc.isDebugEnabled()) {
            Tr.debug(tc, MessageFormat.format("Start time:  [ {0} ]", Long.valueOf(startTime)));
            Tr.debug(tc, MessageFormat.format("End time:    [ {0} ]", Long.valueOf(endTime)));
            Tr.debug(tc, MessageFormat.format("Delta time:  [ {0} ]", Long.valueOf(endTime - startTime)));
            Tr.debug(tc, MessageFormat.format("Stream time: [ {0} ]", Long.valueOf(streamTime)));
        }
    }
359824
public S pollInterval(long poll, TemporalUnit pollUnit) {
        Preconditions.checkArgument(0 <= poll);
        this.poll = Duration.of(poll, pollUnit);
        return self();
    }
699865
protected void updateAndRender(int delta) throws SlickException {
		if (smoothDeltas) {
			if (getFPS() != 0) {
				delta = 1000 / getFPS();
			}
		}
		
		input.poll(width, height);
	
		Music.poll(delta);
		if (!paused) {
			storedDelta += delta;
			
			if (storedDelta >= minimumLogicInterval) {
				try {
					if (maximumLogicInterval != 0) {
						long cycles = storedDelta / maximumLogicInterval;
						for (int i=0;i<cycles;i++) {
							game.update(this, (int) maximumLogicInterval);
						}
						
						int remainder = (int) (storedDelta % maximumLogicInterval);
						if (remainder > minimumLogicInterval) {
							game.update(this, (int) (remainder % maximumLogicInterval));
							storedDelta = 0;
						} else {
							storedDelta = remainder;
						}
					} else {
						game.update(this, (int) storedDelta);
						storedDelta = 0;
					}
					
				} catch (Throwable e) {
					Log.error(e);
					throw new SlickException("Game.update() failure - check the game code.");
				}
			}
		} else {
			game.update(this, 0);
		}
		
		if (hasFocus() || getAlwaysRender()) {
			if (clearEachFrame) {
				GL.glClear(SGL.GL_COLOR_BUFFER_BIT | SGL.GL_DEPTH_BUFFER_BIT);
			} 
			
			GL.glLoadIdentity();
			
			graphics.resetTransform();
			graphics.resetFont();
			graphics.resetLineWidth();
			graphics.setAntiAlias(false);
			try {
				game.render(this, graphics);
			} catch (Throwable e) {
				Log.error(e);
				throw new SlickException("Game.render() failure - check the game code.");
			}
			graphics.resetTransform();
			
			if (showFPS) {
				defaultFont.drawString(10, 10, "FPS: "+recordedFPS);
			}
			
			GL.flush();
		}
		
		if (targetFPS != -1) {
			Display.sync(targetFPS);
		}
	}
479751
@Override
    public T poll() {
        T old = null;

        boolean expedited = false;

        synchronized (this) {
            if (numberOfUsedExpeditedSlots.get() > 0) {
                old = expeditedExtract();
                numberOfUsedExpeditedSlots.getAndDecrement();
                expedited = true;
            } else if (numberOfUsedSlots.get() > 0) {
                old = extract();
                numberOfUsedSlots.getAndDecrement();
            }
        }

        if (old != null) {
            //TODO if expedited is added for put or offer with timeout add notification here
            if (!expedited)
                notifyPut_();
        }

        return old;
    }
409262
public static void dump(final Delta delta, final PrintStream out) {
        final List<Difference> sortedDifferences = new LinkedList<Difference>(delta.getDifferences());
        Collections.sort(sortedDifferences);
        dump(sortedDifferences, out);
    }
708978
public E poll() {
        final ReentrantLock lock = this.lock;
        lock.lock();
        try {
            E first = q.peek();
            return (first == null || first.getDelay(NANOSECONDS) > 0)
                ? null
                : q.poll();
        } finally {
            lock.unlock();
        }
    }
1053539
def start_polling(self, interval):
        
        interval = float(interval)

        self.polling = True

        # clear the stored list of terms - we aren't tracking any
        self.term_checker.reset()

        logger.info("Starting polling for changes to the track list")
        while self.polling:

            loop_start = time()

            self.update_stream()
            self.handle_exceptions()

            # wait for the interval unless interrupted, compensating for time elapsed in the loop
            elapsed = time() - loop_start
            sleep(max(0.1, interval - elapsed))

        logger.warning("Term poll ceased!")
1310068
public void setPollInterval( long pollInterval ) {

		this.pollInterval = pollInterval;
		this.logger.fine( "Template watcher poll interval set to " + pollInterval );
		synchronized( this.watcherLock ) {
			if( this.templateWatcher != null )
				resetWatcher();
		}
	}
365439
@Override
    public E poll() {
        final long consumerIndex = lvConsumerIndex(); // LoadLoad
        final int offset = calcElementOffset(consumerIndex);
        // Copy field to avoid re-reading after volatile load
        final AtomicReferenceArray<E> buffer = this.buffer;

        // If we can't see the next available element we can't poll
        E e = lvElement(buffer, offset); // LoadLoad
        if (null == e) {
            /*
             * NOTE: Queue may not actually be empty in the case of a producer (P1) being interrupted after
             * winning the CAS on offer but before storing the element in the queue. Other producers may go on
             * to fill up the queue after this element.
             */
            if (consumerIndex != lvProducerIndex()) {
                do {
                    e = lvElement(buffer, offset);
                } while (e == null);
            } else {
                return null;
            }
        }

        spElement(buffer, offset, null);
        soConsumerIndex(consumerIndex + 1); // StoreStore
        return e;
    }
159075
private synchronized ListenableFuture<?> updateRevocableMemory(String allocationTag, long delta)
    {
        if (delta >= 0) {
            return memoryPool.reserveRevocable(queryId, delta);
        }
        memoryPool.freeRevocable(queryId, -delta);
        return NOT_BLOCKED;
    }
610073
@Override
    public void run() {
	int received;

	// noinspection InfiniteLoopStatement
	while (true) {
	    // System.out.println("In PollThread loop (sleep=" + sleep +
	    // ")....");
	    try {
		if (sleep != 0) {
		    received = get_command(sleep);
		} else {
		    received = POLL_TIME_OUT;
		}

		long ctm = System.currentTimeMillis();
		now.tv_sec = (int) (ctm / 1000);
		now.tv_usec = (int) (ctm - 1000 * now.tv_sec) * 1000;
		now.tv_sec = now.tv_sec - Tango_DELTA_T;

		switch (received) {
		case POLL_COMMAND:
		    execute_cmd();
		    break;

		case POLL_TIME_OUT:
		    one_more_poll();
		    break;

		case POLL_TRIGGER:
		    one_more_trigg();
		    break;
		}

		ctm = System.currentTimeMillis();
		after.tv_sec = (int) (ctm / 1000);
		after.tv_usec = (int) (ctm - 1000 * after.tv_sec) * 1000;
		after.tv_sec = after.tv_sec - Tango_DELTA_T;

		compute_sleep_time();
	    } catch (final DevFailed e) {
		Util.out2.println("OUPS !! A thread fatal exception !!!!!!!!");
		Except.print_exception(e);
		Util.out2.println("Trying to re-enter the main loop");
	    }
	}
    }
1145648
def _needs_update(self):
        ''

        if self.poll_interval:
            delta = timeit.default_timer() - self._last_update_timer
            poll_status = delta > self.poll_interval.total_seconds()
        else:
            delta = 0
            poll_status = False

        # Do not update if value increment is not large enough to
        # add more bars to progressbar (according to current
        # terminal width)
        try:
            divisor = self.max_value / self.term_width  # float division
            if self.value // divisor == self.previous_value // divisor:
                return poll_status or self.end_time
            else:
                return True
        except Exception:
            # ignore any division errors
            pass

        return poll_status or self.end_time
924129
public void runAfter(long delta)
  {
    long now = CurrentTime.getExactTime();
    
    // boolean isNotify = _heap.queueAt(this, now + delta);
    
    boolean isNotify = _clock.queueAt(this, now + delta);

    if (isNotify) {
      _coordinatorThread.wake();
    }
  }