MCPcopy
hub / github.com/ampproject/amphtml / queueTick_

Method queueTick_

src/service/performance-impl.js:910–918  ·  view source on GitHub ↗

* Queues the events to be flushed when tick function is set. * * @param {TickEventDef} data Tick data to be queued. * @private

(data)

Source from the content-addressed store, hash-verified

908 * @private
909 */
910 queueTick_(data) {
911 // Start dropping the head of the queue if we've reached the limit
912 // so that we don't take up too much memory in the runtime.
913 if (this.events_.length >= QUEUE_LIMIT) {
914 this.events_.shift();
915 }
916
917 this.events_.push(data);
918 }
919
920 /**
921 * Forwards all queued ticks to the viewer tick method.

Callers 1

tickMethod · 0.95

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected