Generate an unexpected change in the timer's completion and
set up the necessary details to render interpolation from the old
to new states
14239
public void changeComplete (float complete)
    {
        // Store the new state
        _complete = complete;

        // Determine the percentage difference between the "actual"
        // completion state and the completion amount to render during
        // the smooth interpolation
        _renderOffset = _renderComplete - _complete;

        // When the timer next ticks, find out when this interpolation
        // should start
        _renderOffsetTime = Long.MIN_VALUE;
    }
242645
private void resetSketchBlockSendTimeout() {
        TimerTask onTimeout = new TimerTask() {
            @Override
            public void run() {
                sendNextSketchBlock();
            }
        };

        stopSketchBlockSendTimeout();
        sketchBlockSendTimeout = new Timer();
        sketchBlockSendTimeout.schedule(onTimeout, SKETCH_BLOCK_SEND_INTERVAL);
    }
652477
function onResizeEnd() {
            utils.dragInfo.inDragging = false;
            utils.dragInfo.justResized = true; // if winJustDragged, should force children re-render
            setTimeout(function () {
              utils.dragInfo.justResized = false;
            }, 1200);

            refreshFrame();
          }
829323
function Animation(prefabCount, settings) {
  // setup timeline

  // the timeline generates shader chunks where an animation step is baked into.
  // each prefab will execute the same animation, with in offset position and time (delay).
  var timeline = new BAS.Timeline();

  timeline.add(4.0, {
    rotate: {
      from: {
        axis: new THREE.Vector3(0, 1, 0),
        angle: 0
      },
      to: {
        angle: Math.PI * 4
      },
      ease: 'easeBackIn',
      // easeParams is an optional argument for easeBack and easeElastic
      // adding them to other eases will result in an error
      // easeBack receives one argument (amplitude)
      easeParams: [settings.backAmplitude]
    },
    scale: {
      to: {x:0.2, y:2.0, z:0.2},
      ease: 'easeBackIn',
      easeParams: [settings.backAmplitude]
    },
    translate: {
      to: {x: 0, y: 4.0, z: 0},
      ease: 'easeBackIn',
      easeParams: [settings.backAmplitude]
    }
  });
  timeline.add(2.0, {
    scale: {
      to: {x:1.0, y:1.0, z:1.0},
      ease: 'easeElasticOut',
      // easeElastic receives two arguments (amplitude and period)
      easeParams: [settings.elasticAmplitude, settings.elasticPeriod]
    },
    translate: {
      to: {x: 0, y: 0, z: 0},
      ease: 'easeElasticOut',
      easeParams: [settings.elasticAmplitude, settings.elasticPeriod]
    }
  });

  // setup prefabs

  var sphereRadius = 10;
  // calculate prefab size based on the number of prefabs to spread over the surface
  var sphereSurface = 4 * Math.PI * sphereRadius * sphereRadius;
  var prefabSize = Math.sqrt(sphereSurface / prefabCount) * 0.4;
  var prefab = new THREE.ConeGeometry(prefabSize, prefabSize * 2, 4, 1, false);
  prefab.translate(0, prefabSize * 0.5, 0);

  // setup prefab geometry
  var geometry = new BAS.PrefabBufferGeometry(prefab, prefabCount);

  var aPosition = geometry.createAttribute('aPosition', 3);
  var aDelayDuration = geometry.createAttribute('aDelayDuration', 3);
  var aQuaternion = geometry.createAttribute('aQuaternion', 4);

  var dataArray = [];

  var up = new THREE.Vector3(0, 1, 0);
  var normal = new THREE.Vector3();
  var quaternion = new THREE.Quaternion();

  this.totalDuration = timeline.duration + settings.maxDelay;

  for (var i = 0; i < prefabCount; i++) {

    // animation
    dataArray[0] = settings.maxDelay * (i / prefabCount);
    dataArray[1] = timeline.duration;
    geometry.setPrefabData(aDelayDuration, i, dataArray);

    // position
    var position = utils.fibSpherePoint(i, prefabCount, sphereRadius);

    position.toArray(dataArray);
    geometry.setPrefabData(aPosition, i, dataArray);

    // rotation
    normal.copy(position);
    normal.normalize();

    quaternion.setFromUnitVectors(up, normal);
    quaternion.toArray(dataArray);
    geometry.setPrefabData(aQuaternion, i, dataArray);
  }

  var material = new BAS.PhongAnimationMaterial({
    flatShading: true,
    side: THREE.DoubleSide,
    uniforms: {
      uTime: {value: 0}
    },
    uniformValues: {
      diffuse: new THREE.Color(0xffffff)
    },
    vertexFunctions: [
      // the eases used by the timeline defined above
      BAS.ShaderChunk['ease_back_in'],
      BAS.ShaderChunk['ease_elastic_out'],
      BAS.ShaderChunk['quaternion_rotation']
      // getChunks outputs the shader chunks where the animation is baked into
    ].concat(timeline.compile()),
    vertexParameters: [
      'uniform float uTime;',

      'attribute vec3 aPosition;',
      'attribute vec4 aQuaternion;',
      'attribute vec2 aDelayDuration;'
    ],
    vertexPosition: [
      // calculate animation time for the prefab
      'float tTime = clamp(uTime - aDelayDuration.x, 0.0, aDelayDuration.y);',

      // apply timeline transformations based on 'tTime'
      timeline.getTransformCalls('scale'),
      timeline.getTransformCalls('rotate'),
      timeline.getTransformCalls('translate'),

      // rotate the vertex by quaternion
      'transformed = rotateVector(aQuaternion, transformed);',

      // translate the vertex by prefab position
      'transformed += aPosition;'
    ]
  });

  THREE.Mesh.call(this, geometry, material);

  this.frustumCulled = false;
}
920348
private void init() {
        _minValue                           = 0;
        _maxValue                           = 100;
        value                               = new DoublePropertyBase(_minValue) {
            private void update() {
                final double VALUE = get();
                withinSpeedLimit = !(Instant.now().minusMillis(getAnimationDuration()).isBefore(lastCall));
                lastCall = Instant.now();
                if (isAnimated() && withinSpeedLimit) {
                    long animationDuration = isReturnToZero() ? (long) (0.2 * getAnimationDuration()) : getAnimationDuration();
                    timeline.stop();

                    final KeyValue KEY_VALUE = new KeyValue(currentValue, VALUE, Interpolator.SPLINE(0.5, 0.4, 0.4, 1.0));
                    final KeyFrame KEY_FRAME = new KeyFrame(Duration.millis(animationDuration), KEY_VALUE);
                    timeline.getKeyFrames().setAll(KEY_FRAME);
                    timeline.play();
                } else {
                    currentValue.set(VALUE);
                    fireTileEvent(FINISHED_EVENT);
                }
                if (isAveragingEnabled()) { movingAverage.addData(new TimeData(VALUE)); }
            }
            @Override protected void invalidated() { update(); }
            @Override public void set(final double VALUE) {
                // ATTENTION There is an optimization in the properties so that properties
                // only get invalid if the the new value is different from the old value
                if (Helper.equals(VALUE, getFormerValue())) { update(); }
                super.set(VALUE);
                fireTileEvent(VALUE_EVENT);
            }
            @Override public Object getBean() { return Tile.this; }
            @Override public String getName() { return "value"; }
        };
        oldValue                            = new SimpleDoubleProperty(Tile.this, "oldValue", value.get());
        currentValue                        = new DoublePropertyBase(value.get()) {
            @Override protected void invalidated() {
                final double VALUE = get();
                if (isCheckThreshold()) {
                    double thrshld = getThreshold();
                    if (formerValue.get() < thrshld && VALUE > thrshld) {
                        fireTileEvent(EXCEEDED_EVENT);
                    } else if (formerValue.get() > thrshld && VALUE < thrshld) {
                        fireTileEvent(UNDERRUN_EVENT);
                    }
                }
                if (VALUE < getMinMeasuredValue()) {
                    setMinMeasuredValue(VALUE);
                } else if (VALUE > getMaxMeasuredValue()) {
                    setMaxMeasuredValue(VALUE);
                }
                formerValue.set(VALUE);
            }
            @Override public void set(final double VALUE) { super.set(VALUE); }
            @Override public Object getBean() { return Tile.this; }
            @Override public String getName() { return "currentValue";}
        };
        formerValue                         = new SimpleDoubleProperty(Tile.this, "formerValue", value.get());
        _range                              = _maxValue - _minValue;
        _threshold                          = _maxValue;
        _referenceValue                     = _minValue;
        _autoReferenceValue                 = true;

        currentTime                         = new LongPropertyBase(getTime().toEpochSecond()) {
            @Override public Object getBean() { return Tile.this; }
            @Override public String getName() { return "currentTime"; }
        };
        _title                              = "";
        _titleAlignment                     = TextAlignment.LEFT;
        _description                        = "";
        _descriptionAlignment               = Pos.TOP_RIGHT;
        _unit                               = "";
        oldFlipText                         = "";
        _flipText                           = "";
        _active                             = false;
        _text                               = "";
        _textAlignment                      = TextAlignment.LEFT;
        _averagingEnabled                   = false;
        _averagingPeriod                    = 10;
        _duration                           = LocalTime.of(1, 0);
        _imageMask                          = ImageMask.NONE;
        _currentLocation                    = new Location(0, 0);
        _trackColor                         = TileColor.BLUE;
        _mapProvider                        = MapProvider.BW;
        flipTimeInMS                        = 500;

        _textSize                           = TextSize.NORMAL;
        _roundedCorners                     = true;
        _startFromZero                      = false;
        _returnToZero                       = false;
        _minMeasuredValue                   = _maxValue;
        _maxMeasuredValue                   = _minValue;
        _minMeasuredValueVisible            = false;
        _maxMeasuredValueVisible            = false;
        _oldValueVisible                    = false;
        _valueVisible                       = true;
        _foregroundColor                    = FOREGROUND;
        _backgroundColor                    = BACKGROUND;
        _borderColor                        = Color.TRANSPARENT;
        _borderWidth                        = 1;
        _knobColor                          = FOREGROUND;
        _activeColor                        = BLUE;
        _animated                           = false;
        animationDuration                   = 800;
        _startAngle                         = 0;
        _angleRange                         = 180;
        _angleStep                          = _angleRange / _range;
        _autoScale                          = true;
        _shadowsEnabled                     = false;
        _locale                             = Locale.US;
        _numberFormat                       = NumberFormat.getInstance(_locale);
        _decimals                           = 1;
        _tickLabelDecimals                  = 1;
        _needleColor                        = FOREGROUND;
        _hourColor                          = FOREGROUND;
        _minuteColor                        = FOREGROUND;
        _secondColor                        = FOREGROUND;
        _barColor                           = BLUE;
        _barBackgroundColor                 = BACKGROUND;
        _titleColor                         = FOREGROUND;
        _descriptionColor                   = FOREGROUND;
        _unitColor                          = FOREGROUND;
        _valueColor                         = FOREGROUND;
        _textColor                          = FOREGROUND;
        _dateColor                          = FOREGROUND;
        _hourTickMarkColor                  = FOREGROUND;
        _minuteTickMarkColor                = FOREGROUND;
        _alarmColor                         = FOREGROUND;
        _thresholdColor                     = RED;
        _checkSectionsForValue              = false;
        _checkThreshold                     = false;
        _innerShadowEnabled                 = false;
        _thresholdVisible                   = false;
        _averageVisible                     = false;
        _sectionsVisible                    = false;
        _sectionsAlwaysVisible              = false;
        _sectionTextVisible                 = false;
        _sectionIconsVisible                = false;
        _highlightSections                  = false;
        _orientation                        = Orientation.HORIZONTAL;
        _keepAspect                         = true;
        _customFontEnabled                  = false;
        _customFont                         = Fonts.latoRegular(12);
        _alert                              = false;
        _alertMessage                       = "";
        _smoothing                          = false;
        _secondsVisible                     = false;
        _discreteSeconds                    = true;
        _discreteMinutes                    = true;
        _discreteHours                      = false;
        _textVisible                        = true;
        _dateVisible                        = false;
        _running                            = false;
        _hourTickMarksVisible               = true;
        _minuteTickMarksVisible             = true;
        _alarmsEnabled                      = false;
        _alarmsVisible                      = false;
        _strokeWithGradient                 = false;
        _fillWithGradient                   = false;
        tooltip                             = new Tooltip(null);
        _xAxis                              = new CategoryAxis();
        _yAxis                              = new NumberAxis();
        _radarChartMode                     = Mode.POLYGON;
        _chartGridColor                     = Tile.GRAY;
        _sortedData                         = true;
        _dataPointsVisible                  = false;
        _snapToTicks                        = false;
        _minorTickCount                     = 0;
        _majorTickUnit                      = 1;
        _matrixSize                         = new int[]{ 30, 25 };
        _chartType                          = ChartType.LINE;
        _tooltipTimeout                     = 2000;
        _notifyRegionBackgroundColor        = Tile.YELLOW;
        _notifyRegionForegroundColor        = Tile.BACKGROUND;
        _infoRegionBackgroundColor          = Tile.DARK_BLUE;
        _infoRegionForegroundColor          = Tile.FOREGROUND;
        _infoRegionTooltipText              = "";
        _backgroundImage                    = null;
        _backgroundImageOpacity             = 0.2;
        _backgroundImageKeepAspect          = true;
        _leftText                           = "";
        _middleText                         = "";
        _rightText                          = "";
        _leftValue                          = 0;
        _middleValue                        = 0;
        _rightValue                         = 0;
        _leftGraphics                       = null;
        _middleGraphics                     = null;
        _rightGraphics                      = null;
        updateInterval                      = LONG_INTERVAL;
        increment                           = 1;
        originalMinValue                    = -Double.MAX_VALUE;
        originalMaxValue                    = Double.MAX_VALUE;
        originalThreshold                   = Double.MAX_VALUE;
        lastCall                            = Instant.now();
        timeline                            = new Timeline();
        timeline.setOnFinished(e -> {
            if (isReturnToZero() && !Helper.equals(currentValue.get(), 0.0)) {
                final KeyValue KEY_VALUE2 = new KeyValue(value, 0, Interpolator.SPLINE(0.5, 0.4, 0.4, 1.0));
                final KeyFrame KEY_FRAME2 = new KeyFrame(Duration.millis((long) (0.8 * getAnimationDuration())), KEY_VALUE2);
                timeline.getKeyFrames().setAll(KEY_FRAME2);
                timeline.play();
            }
            fireTileEvent(FINISHED_EVENT);
        });
    }
616718
def update_window(turn_from, tick_from, turn_to, tick_to, updfun, branchd):
    """"""
    if turn_from in branchd:
        # Not including the exact tick you started from because deltas are *changes*
        for past_state in branchd[turn_from][tick_from+1:]:
            updfun(*past_state)
    for midturn in range(turn_from+1, turn_to):
        if midturn in branchd:
            for past_state in branchd[midturn][:]:
                updfun(*past_state)
    if turn_to in branchd:
        for past_state in branchd[turn_to][:tick_to+1]:
            updfun(*past_state)
218348
function tick (a) {
			if (isStopped) return;

			let playedTime = context.currentTime - initTime;
			let playedCount = playedTime * sampleRate;

			//if offset has changed - notify processor to provide a new piece of data
			if (lastCount - playedCount < samplesPerFrame) {
				//send queued data chunk to buffer
				util.copy(shift(samplesPerFrame), buffer, lastCount % buffer.length)

				//increase rendered count
				lastCount += samplesPerFrame;

				//if there is a holding pressure control - release it
				if (release) {
					let cb = release;
					release = null;
					cb()
				}

				//call tick extra-time in case if there is a room for buffer
				//it will plan timeout, if none
				tick()
			}
			//else plan tick for the expected time of starving
			else {
				//time of starving is when played time reaches (last count time) - half-duration
				let starvingTime = (lastCount - samplesPerFrame) / sampleRate;
				let remainingTime = starvingTime - playedTime;
				setTimeout(tick, remainingTime * 1000)
			}
		}
1157316
@SuppressWarnings("WeakerAccess") // Public API
    public static void interpolate(State out, State start, State end, float factor) {
        interpolate(out, start, start.getX(), start.getY(), end, end.getX(), end.getY(), factor);
    }
1312683
function postDraw(renderer) {
         if (typeof this.mask !== "undefined") {
           renderer.clearMask();
         }

         if (typeof this.tint !== "undefined") {
           renderer.clearTint();
         } // restore the context


         renderer.restore();
       }
449479
function startFPSMonitor() {
        checkInit();
        var data = new Data();
        var w = new MonitorWidget("FPS", "", 2 /* HideMax */ | 1 /* HideMin */ | 4 /* HideMean */ | 32 /* RoundValues */);
        container.appendChild(w.element);
        var samples = [];
        var last = 0;
        function update(now) {
            var elapsed = (now - (last === 0 ? now : last)) / 1000;
            var fps = 1 / elapsed;
            if (fps !== Infinity) {
                if (samples.length === 64) {
                    samples.shift();
                }
                samples.push(fps);
                var sum = 0;
                for (var i = 0; i < samples.length; i++) {
                    sum += samples[i];
                }
                var mean = sum / samples.length;
                data.addSample(mean);
                w.addResult(data.calc());
            }
            last = now;
            requestAnimationFrame(update);
        }
        requestAnimationFrame(update);
    }
102095
def interpolate_timestamp(capture_times):
    '''
    
    '''
    timestamps = []
    num_file = len(capture_times)

    time_dict = OrderedDict()

    if num_file < 2:
        return capture_times

    # trace identical timestamps (always assume capture_times is sorted)
    time_dict = OrderedDict()
    for i, t in enumerate(capture_times):
        if t not in time_dict:
            time_dict[t] = {
                "count": 0,
                "pointer": 0
            }

            interval = 0
            if i != 0:
                interval = (t - capture_times[i - 1]).total_seconds()
                time_dict[capture_times[i - 1]]["interval"] = interval

        time_dict[t]["count"] += 1

    if len(time_dict) >= 2:
        # set time interval as the last available time interval
        time_dict[time_dict.keys()[-1]
                  ]["interval"] = time_dict[time_dict.keys()[-2]]["interval"]
    else:
        # set time interval assuming capture interval is 1 second
        time_dict[time_dict.keys()[0]]["interval"] = time_dict[time_dict.keys()[
            0]]["count"] * 1.

    # interpolate timestamps
    for t in capture_times:
        d = time_dict[t]
        s = datetime.timedelta(
            seconds=d["pointer"] * d["interval"] / float(d["count"]))
        updated_time = t + s
        time_dict[t]["pointer"] += 1
        timestamps.append(updated_time)

    return timestamps
254610
def interpolation_change_cb(self, setting, value):
        """"""
        canvas_img = self.get_canvas_image()
        canvas_img.interpolation = value
        canvas_img.reset_optimize()
        self.redraw(whence=0)
863459
function addStateModifier() {
    var modifier = new StateModifier({
        size: [undefined, 100],
        align: [0.7, 0.5],
        origin: [0.5, 0.5],
        proportions: [0.2, 1],
        opacity: 0.5
        //transform: Transform.thenMove(Transform.rotateZ(Math.PI / 3), [200, 50, 0])
    });

    modifier.setAlign(
        [0.5, 0.5],
        { duration: 1000, curve: Easing.inExpo },
        function() {
            modifier.setTransform(
                Transform.thenMove(Transform.rotateZ(Math.PI / 3), [50, 50, 0]),
                { duration: 800, curve: Easing.inExpo }
            );
        }
    );

    var surface = new Surface({
        content: 'HI',
        properties: {
            backgroundColor: 'red',
            color: 'white',
            textAlign: 'center',
            fontSize: '40px',
            borderRadius: '10px'
        }
    });

    ctx.add(modifier).add(surface);
}
620885
private void changeState() {
        if (m_state == State.RESTORE) {
            fetchSnapshotTxnId();

            exitRestore();
            m_state = State.REPLAY;

            /*
             * Add the interest here so that we can use the barriers in replay
             * agent to synchronize.
             */
            m_snapshotMonitor.addInterest(this);
            m_replayAgent.replay();
        } else if (m_state == State.REPLAY) {
            m_state = State.TRUNCATE;
        } else if (m_state == State.TRUNCATE) {
            m_snapshotMonitor.removeInterest(this);
            if (m_callback != null) {
                m_callback.onReplayCompletion(m_truncationSnapshot, m_truncationSnapshotPerPartition);
            }

            // Call balance partitions after enabling transactions on the node to shorten the recovery time
            if (m_isLeader) {
                m_replayAgent.resumeElasticOperationIfNecessary();
            }
        }
    }
79200
function handleBrushEnd() {
            if (!d3Selection.event.sourceEvent) {
                return; // Only transition after input.
            }

            let dateExtentRounded = [null, null];
            const selection = d3Selection.event.selection;

            if (selection) {
                let dateExtent = selection.map(xScale.invert);

                dateExtentRounded = dateExtent.map(timeIntervals[roundingTimeInterval].round);

                // If empty when rounded, use floor & ceil instead.
                if (dateExtentRounded[0] >= dateExtentRounded[1]) {
                    dateExtentRounded[0] = timeIntervals[roundingTimeInterval].floor(dateExtent[0]);
                    dateExtentRounded[1] = timeIntervals[roundingTimeInterval].offset(dateExtentRounded[0]);
                }

                d3Selection.select(this)
                    .transition()
                    .call(d3Selection.event.target.move, dateExtentRounded.map(xScale));
            }

            dispatcher.call('customBrushEnd', this, dateExtentRounded);
        }
1219746
function() {
		// temp local vars
		var lastFlickDuration,
			tempReleasePos;

		// s = this
		var s = {
			lastFlickOffset: {},
			lastFlickDist: {},
			lastFlickSpeed: {},
			slowDownRatio:  {},
			slowDownRatioReverse:  {},
			speedDecelerationRatio:  {},
			speedDecelerationRatioAbs:  {},
			distanceOffset:  {},
			backAnimDestination: {},
			backAnimStarted: {},
			calculateSwipeSpeed: function(axis) {
				

				if( _posPoints.length > 1) {
					lastFlickDuration = _getCurrentTime() - _gestureCheckSpeedTime + 50;
					tempReleasePos = _posPoints[_posPoints.length-2][axis];
				} else {
					lastFlickDuration = _getCurrentTime() - _gestureStartTime; // total gesture duration
					tempReleasePos = _startPoint[axis];
				}
				s.lastFlickOffset[axis] = _currPoint[axis] - tempReleasePos;
				s.lastFlickDist[axis] = Math.abs(s.lastFlickOffset[axis]);
				if(s.lastFlickDist[axis] > 20) {
					s.lastFlickSpeed[axis] = s.lastFlickOffset[axis] / lastFlickDuration;
				} else {
					s.lastFlickSpeed[axis] = 0;
				}
				if( Math.abs(s.lastFlickSpeed[axis]) < 0.1 ) {
					s.lastFlickSpeed[axis] = 0;
				}
				
				s.slowDownRatio[axis] = 0.95;
				s.slowDownRatioReverse[axis] = 1 - s.slowDownRatio[axis];
				s.speedDecelerationRatio[axis] = 1;
			},

			calculateOverBoundsAnimOffset: function(axis, speed) {
				if(!s.backAnimStarted[axis]) {

					if(_panOffset[axis] > _currPanBounds.min[axis]) {
						s.backAnimDestination[axis] = _currPanBounds.min[axis];
						
					} else if(_panOffset[axis] < _currPanBounds.max[axis]) {
						s.backAnimDestination[axis] = _currPanBounds.max[axis];
					}

					if(s.backAnimDestination[axis] !== undefined) {
						s.slowDownRatio[axis] = 0.7;
						s.slowDownRatioReverse[axis] = 1 - s.slowDownRatio[axis];
						if(s.speedDecelerationRatioAbs[axis] < 0.05) {

							s.lastFlickSpeed[axis] = 0;
							s.backAnimStarted[axis] = true;

							_animateProp('bounceZoomPan'+axis,_panOffset[axis], 
								s.backAnimDestination[axis], 
								speed || 300, 
								framework.easing.sine.out, 
								function(pos) {
									_panOffset[axis] = pos;
									_applyCurrentZoomPan();
								}
							);

						}
					}
				}
			},

			// Reduces the speed by slowDownRatio (per 10ms)
			calculateAnimOffset: function(axis) {
				if(!s.backAnimStarted[axis]) {
					s.speedDecelerationRatio[axis] = s.speedDecelerationRatio[axis] * (s.slowDownRatio[axis] + 
												s.slowDownRatioReverse[axis] - 
												s.slowDownRatioReverse[axis] * s.timeDiff / 10);

					s.speedDecelerationRatioAbs[axis] = Math.abs(s.lastFlickSpeed[axis] * s.speedDecelerationRatio[axis]);
					s.distanceOffset[axis] = s.lastFlickSpeed[axis] * s.speedDecelerationRatio[axis] * s.timeDiff;
					_panOffset[axis] += s.distanceOffset[axis];

				}
			},

			panAnimLoop: function() {
				if ( _animations.zoomPan ) {
					_animations.zoomPan.raf = _requestAF(s.panAnimLoop);

					s.now = _getCurrentTime();
					s.timeDiff = s.now - s.lastNow;
					s.lastNow = s.now;
					
					s.calculateAnimOffset('x');
					s.calculateAnimOffset('y');

					_applyCurrentZoomPan();
					
					s.calculateOverBoundsAnimOffset('x');
					s.calculateOverBoundsAnimOffset('y');


					if (s.speedDecelerationRatioAbs.x < 0.05 && s.speedDecelerationRatioAbs.y < 0.05) {

						// round pan position
						_panOffset.x = Math.round(_panOffset.x);
						_panOffset.y = Math.round(_panOffset.y);
						_applyCurrentZoomPan();
						
						_stopAnimation('zoomPan');
						return;
					}
				}

			}
		};
		return s;
	}
50745
public void addChangingSimons() {
		timer.schedule(new TimerTask() {
			final Stopwatch tlStopwatch = SimonManager.getStopwatch("TL");

			@Override
			public void run() {
				try {
					lock.lock();
					System.out.println("TL " + addStopwatchSplit(tlStopwatch));
				} finally {
					lock.unlock();
				}
			}
		}, 0, 10000L);
	}