A helper function used to call {@link AbstractMedia#tick}.
779179
protected final void tickMedia (AbstractMedia media, long tickStamp)
    {
        if (media._firstTick == 0L) {
            media.willStart(tickStamp);
        }
        media.tick(tickStamp);
    }
1127588
public void setMediumTickMarkType(final TickMarkType TYPE) {
        if (null == mediumTickMarkType) {
            _mediumTickMarkType = null == TYPE ? TickMarkType.LINE : TYPE;
            fireUpdateEvent(REDRAW_EVENT);
        } else {
            mediumTickMarkType.set(TYPE);
        }
    }
141422
private synchronized TickRange msgRemoved(long tick, StateStream ststream, TransactionCommon tran) throws SIResourceException
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
       SibTr.entry(this, tc, "msgRemoved", 
                   new Object[]{Long.valueOf(tick), 
                               ststream, 
                               tran});
       
    
    TickRange tr1 = null;
    boolean sendMessage = false;

    long stamp = tick;
    
    // We know we have reduced the number of messages in the stream
    totalMessages--;
        
    if(TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
      SibTr.debug(this, tc, "totalMessages: " + totalMessages +
                            ", sendWindow: " + sendWindow +
                            ", definedSendWindow: " + definedSendWindow +
                            ", firstMsgOutsideSendWindow: " + firstMsgOutsideWindow);
    
    // We may not send any messages if our stream contains guesses
    // or if we are supposed to be reducing the sendWindow
    if( ( (containsGuesses) || (sendWindow > definedSendWindow ) )
      && ( stamp < firstMsgOutsideWindow ) )
    {
      // Just shrink the sendWindow
      if( sendWindow > 0)
      { 
        sendWindow--;
        persistSendWindow(sendWindow, tran); 
      }
    }
    else
    {
      // If the message we have just removed from the stream was
      // inside the sendWindow then we can move up our 
      // firstMsgOutsideWindow and possibly send the message which
      // moves inside the window
      // If it actually was the first message outside the window
      // the code below will also work
      // If it was beyond the window we can afford to ignore it 
      if (stamp <= firstMsgOutsideWindow)
      {
        // send firstMsgOutsideWindow
        // first need to get it and check that it is in Value state
        ststream.setCursor(firstMsgOutsideWindow);
 
        // Get the first TickRange outside the inDoubt window
        tr1 = ststream.getNext();
          
        // This range must be either Uncommitted or Value as that is how
        // we set the firstMsgOutsideWindow pointer    
        // Only want to send this message if it is 
        // committed. Otherwise do nothing as it will
        // get sent when it commits
        if (tr1.type == TickRange.Value)
        {
          sendMessage = true;
        }
     
        TickRange tr = null;
        if (totalMessages > sendWindow)
        {
          // Get the next Value or Uncommitted tick from the stream
          tr = ststream.getNext();
          while( tr.type == TickRange.Completed && tr.endstamp != RangeList.INFINITY)
          {
            tr = ststream.getNext();
          }
          firstMsgOutsideWindow = tr.valuestamp;
        }
        // That was the last message outside the send window, so put us back into a state
        // ignorant of guesses, otherwise we may not realise to re-calculate the firstMsgOutSideWindow
        // the next time we get a guess.
        else
        {
          firstMsgOutsideWindow = RangeList.INFINITY;
          containsGuesses = false;
        }
        
        if(TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
          SibTr.debug(this, tc, "firstMsgOutsideSendWindow: " + firstMsgOutsideWindow);
      }
    }

    // Return a null if nothing to send
    if (!sendMessage)
      tr1 = null;

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.exit(tc, "msgRemoved", tr1);

    return tr1;
  }
578585
public void tick (long tickStamp)
    {
        if (_nextTime == -1) {
            // First time through
            _nextTime = tickStamp + _initDelay;
        } else if (tickStamp >= _nextTime) {

            // If we're repeating, set the next time to run, otherwise, reset
            if (_repeatDelay != 0L) {
                _nextTime += _repeatDelay;
            } else {
                _nextTime = -1;
                cancel();
            }
            expired();
        }
    }
607759
function WMClock(ticks,     // @arg TickFunctionArray = [] - [tick, ...]
                 options) { // @arg Object = {} - { start, vsync, speed, pulse, suspend, baseTime }
                            // @options.start Boolean = false - auto start.
                            // @options.vsync Boolean = false - use requestAnimationFrame(false is use setInterval).
                            // @options.speed Number = 16.666 - setInterval(, speed)
                            // @options.pulse Number = 0.0 - overwrite delta time(unit: ms)(range of oscillation time).
                            // @options.suspend Boolean = false - automatically suspend by page visibility event.
                            // @options.baseTime Number = 0.0 - setBaseTime value
                            // @desc Master Clock.
//{@dev
    $valid($type(ticks,   "TickFunctionArray|omit"), WMClock, "ticks");
    $valid($type(options, "Object|omit"), WMClock, "options");
    $valid($keys(options, "start|vsync|speed|pulse|suspend|baseTime"), WMClock, "options");
    if (options) {
        $valid($type(options.start, "Boolean|omit"), WMClock, "options.start");
        $valid($type(options.vsync, "Boolean|omit"), WMClock, "options.vsync");
        $valid($type(options.speed, "Number|omit"),  WMClock, "options.speed");
        $valid($type(options.pulse, "Number|omit"),  WMClock, "options.pulse");
        $valid($type(options.suspend, "Boolean|omit"), WMClock, "options.suspend");
        $valid($type(options.baseTime, "Number|omit"), WMClock, "options.baseTime");
    }
//}@dev

    options = options || {};

    var that = this;

    this._mode    = MODE_INTERVAL;              // Integer - mode. MODE_XXX
    this._ticks   = [];                         // TickFunctionArray - callback functions. [tick, ...]
    this._speed   = options["speed"] || 16.666; // Number - setInterval(, speed)
    this._pulse   = options["pulse"] || 0.0;    // Number - overwrite delta time(range of oscillation time).
    this._active  = false;                      // Boolean - active state.
    this._timerID = 0;                          // Integer - timer id.
    this._counter = 0;                          // Integer - callback counter.
    this._timeStamp = -1;                       // Number - last time stamp.
    this._baseTime  = 0.0;
    this._baseTimeDiff = 0.0;                   // difference time
    this._enterFrame = _enterFrame.bind(this);  // Function - _enterFrame.bind(this)
    this._suspend = { begin: 0, total: 0 };

    (ticks || []).forEach(WMClock_on, this);

    if (options["vsync"]) {
        this._mode = global["requestAnimationFrame"] ? MODE_RAF : MODE_RAF_EMULATE;
    }
    if (options["suspend"]) { // auto suspend
        if (global["PageVisibilityEvent"]) {
            global["PageVisibilityEvent"]["on"](_onsuspend);
        }
    }
    if (options["start"]) { // auto start
        this["start"]();
    }
    this["setBaseTime"](options["baseTime"] || 0.0);

    function _onsuspend(pageHide) {
        if (pageHide) {
            that._suspend.begin = Date.now();
            that["stop"]();
        } else {
            that._suspend.total += ( Date.now() - that._suspend.begin );
            that._suspend.begin = 0;
            that["start"]();
        }
    }
}
1307794
function(time) {
    var ms = time - this.lastTime;
    this.lastTime = time;

    // Update the different components of the scene.
    this.map.update(ms / 1000);
    this.player.update(ms / 1000);
    this.camera.render(this.player, this.map);

    // Continue the game loop.
    requestAnimationFrame(this.tick.bind(this));
  }
743416
function tick(){

    performanceCollector.tick();

    const useMedia = dataManager.getMediaState();
    const playTimeSinceStart = timeManager.getPlayTimeSinceStart();

    for (let key in dataConfig){

        const infoDict = dataConfig[key];

        if (infoDict.status && 
            playTimeSinceStart - infoDict.lastFetchTime > infoDict.timePeriod){
            
            const timeDifferene = playTimeSinceStart - infoDict.lastFetchTime;

            if (useMedia)
                _setEvents(infoDict.calculator.getMediaEvents(timeDifferene));
            
            // always collecting default events
            _setEvents(infoDict.calculator.getEvents(timeDifferene));
                
            infoDict.lastFetchTime = playTimeSinceStart;

        }

    }

}
351645
public static function tick(float $ms, callable $callback, $params = null)
    {
        $tid = Timer::tick($ms, $callback, $params);

        // save meta info
        self::$timers[$tid] = [
            'type'     => 'tick',
            'ctime'    => \time(), // add time.
            'interval' => $ms,
        ];

        return $tid;
    }
1193029
function (time) {
            last = now;
            now = time;
            delta = (now - last);

            // fix for negative timestamp returned by wechat or chrome on startup
            if (delta < 0) {
                delta = 0;
            }

            // get the game tick
            api.tick = (delta > minstep && me.sys.interpolation) ? delta / step : 1;

            for (var i = 0, len = timers.length; i < len; i++) {
                var _timer = timers[i];
                if (!(_timer.pauseable && me.state.isPaused())) {
                    _timer.elapsed += delta;
                }
                if (_timer.elapsed >= _timer.delay) {
                    _timer.fn.apply(null, _timer.args);
                    if (_timer.repeat === true) {
                        _timer.elapsed -= _timer.delay;
                    } else {
                        me.timer.clearTimeout(_timer.timerId);
                    }
                }
            }
        }
321845
function(t) {

        var self = this;

        /**
         * A YAHOO.widget.SliderThumb instance that we will use to 
         * reposition the thumb when the background is clicked
         * @property thumb
         * @type YAHOO.widget.SliderThumb
         */
        this.thumb = t;

        t.cacheBetweenDrags = true;

        if (t._isHoriz && t.xTicks && t.xTicks.length) {
            this.tickPause = Math.round(360 / t.xTicks.length);
        } else if (t.yTicks && t.yTicks.length) {
            this.tickPause = Math.round(360 / t.yTicks.length);
        }


        // delegate thumb methods
        t.onAvailable = function() { 
                return self.setStartSliderState(); 
            };
        t.onMouseDown = function () { 
                self._mouseDown = true;
                return self.focus(); 
            };
        t.startDrag = function() { 
                self._slideStart(); 
            };
        t.onDrag = function() { 
                self.fireEvents(true); 
            };
        t.onMouseUp = function() { 
                self.thumbMouseUp(); 
            };

    }
1370250
public static void tick() {
        sumFrames++;
        if (startTime == 0) {
            startTime = SystemClock.uptimeMillis();
        }

        ++frames;
        long currentTime = System.currentTimeMillis();
        if (currentTime - startTimeMillis >= interval) {
            int fps = (int) (frames * 1000 / interval);
            Log.v("FPSCounter", "FPS : " + fps);
            frames = 0;
            startTimeMillis = currentTime;
        }
    }
1166331
function tick() {
        currentTime += 1 / 60;
        var p = currentTime / time;
        var t = easingEquations[easing](p);

        if (p < 1) {
            requestAnimationFrame(tick);

            window.scrollTo(0, scrollY + ((scrollTargetY - scrollY) * t));
        } else {
            window.scrollTo(0, scrollTargetY);
        }
    }
237565
public void tick(long duration, TimeUnit unit) {
        this.date = new Date(date.getTime() + unit.toMillis(duration));
    }
478064
public void tick() {
        final long count = uncounted.sumThenReset();
        final double instantRate = count / interval;
        if (initialized) {
            rate += (alpha * (instantRate - rate));
        } else {
            rate = instantRate;
            initialized = true;
        }
    }
48322
def _call_when_changed(self, ticks, state):
        
        method = self._when_changed()
        if method is None:
            self.when_changed = None
        else:
            method(ticks, state)
505557
private BufferedImage create_TICKMARKS_Image(final int WIDTH) {
        if (WIDTH <= 0) {
            return null;
        }

        final BufferedImage IMAGE = UTIL.createImage(WIDTH, WIDTH, Transparency.TRANSLUCENT);
        final Graphics2D G2 = IMAGE.createGraphics();
        G2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
        G2.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON);
        G2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
        G2.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
        G2.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
        G2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE);
        G2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
        final int IMAGE_WIDTH = IMAGE.getWidth();

        final AffineTransform OLD_TRANSFORM = G2.getTransform();

        final BasicStroke THIN_STROKE = new BasicStroke(0.01f * IMAGE_WIDTH, BasicStroke.CAP_ROUND, BasicStroke.JOIN_BEVEL);
        final Font FONT = new Font("Verdana", 0, (int) (0.0747663551f * IMAGE_WIDTH));
        final float TEXT_DISTANCE = 0.1f * IMAGE_WIDTH;
        final float MIN_LENGTH = 0.02f * IMAGE_WIDTH;
        final float MED_LENGTH = 0.04f * IMAGE_WIDTH;

        // Create the watch itself
        final float RADIUS = IMAGE_WIDTH * 0.37f;
        CENTER.setLocation(IMAGE_WIDTH / 2.0f, IMAGE_WIDTH / 2.0f);

        // Draw ticks
        Point2D innerPoint = new Point2D.Double();
        Point2D outerPoint = new Point2D.Double();
        Point2D textPoint = new Point2D.Double();
        Line2D tick;
        int tickCounterFull = 0;
        int tickCounterHalf = 0;
        int counter = 0;

        double sinValue = 0;
        double cosValue = 0;

        final double STEP = (2.0 * Math.PI) / (20.0);

        if (isTickmarkColorFromThemeEnabled()) {
            G2.setColor(getBackgroundColor().LABEL_COLOR);
        } else {
            G2.setColor(getTickmarkColor());
        }

        for (double alpha = 2.0 * Math.PI; alpha >= 0; alpha -= STEP) {
            G2.setStroke(THIN_STROKE);
            sinValue = Math.sin(alpha);
            cosValue = Math.cos(alpha);

            if (tickCounterHalf == 1) {
                G2.setStroke(THIN_STROKE);
                innerPoint.setLocation(CENTER.getX() + (RADIUS - MIN_LENGTH) * sinValue, CENTER.getY() + (RADIUS - MIN_LENGTH) * cosValue);
                outerPoint.setLocation(CENTER.getX() + RADIUS * sinValue, CENTER.getY() + RADIUS * cosValue);
                // Draw ticks
                tick = new Line2D.Double(innerPoint.getX(), innerPoint.getY(), outerPoint.getX(), outerPoint.getY());
                G2.draw(tick);

                tickCounterHalf = 0;
            }

            // Different tickmark every 15 units
            if (tickCounterFull == 2) {
                G2.setStroke(THIN_STROKE);
                innerPoint.setLocation(CENTER.getX() + (RADIUS - MED_LENGTH) * sinValue, CENTER.getY() + (RADIUS - MED_LENGTH) * cosValue);
                outerPoint.setLocation(CENTER.getX() + RADIUS * sinValue, CENTER.getY() + RADIUS * cosValue);

                // Draw ticks
                tick = new Line2D.Double(innerPoint.getX(), innerPoint.getY(), outerPoint.getX(), outerPoint.getY());
                G2.draw(tick);

                tickCounterFull = 0;
            }

            // Draw text
            G2.setFont(FONT);
            textPoint.setLocation(CENTER.getX() + (RADIUS - TEXT_DISTANCE) * sinValue, CENTER.getY() + (RADIUS - TEXT_DISTANCE) * cosValue);
            if (counter != 20 && counter % 2 == 0) {
                G2.rotate(Math.toRadians(0), CENTER.getX(), CENTER.getY());
                G2.fill(UTIL.rotateTextAroundCenter(G2, String.valueOf(counter / 2), (int) textPoint.getX(), (int) textPoint.getY(), (2 * Math.PI - alpha)));
            }

            G2.setTransform(OLD_TRANSFORM);

            tickCounterHalf++;
            tickCounterFull++;

            counter++;
        }

        G2.dispose();

        return IMAGE;
    }
499607
@Override
    public void mark(long n) {
        tickIfNecessary();
        count.add(n);
        m1Rate.update(n);
        m5Rate.update(n);
        m15Rate.update(n);
    }