(DOMHighResTimeStamp)
| 1664 | const DOMHighResTimeStampCollection = [] |
| 1665 | |
| 1666 | const triggerAnimation = function (DOMHighResTimeStamp) { |
| 1667 | DOMHighResTimeStampCollection.unshift(DOMHighResTimeStamp) |
| 1668 | if (DOMHighResTimeStampCollection.length > 10) { |
| 1669 | const t0 = DOMHighResTimeStampCollection.pop() |
| 1670 | const fps = Math.floor((1000 * 10) / (DOMHighResTimeStamp - t0)) |
| 1671 | if (!callbackTriggered) { |
| 1672 | callback.call(undefined, fps, DOMHighResTimeStampCollection) |
| 1673 | } |
| 1674 | if (runIndefinitely) { |
| 1675 | callbackTriggered = false |
| 1676 | } else { |
| 1677 | callbackTriggered = true |
| 1678 | } |
| 1679 | } |
| 1680 | requestId = window.requestAnimationFrame(triggerAnimation) |
| 1681 | } |
| 1682 | |
| 1683 | window.requestAnimationFrame(triggerAnimation) |
| 1684 | // Stop after half second if it shouldn't run indefinitely |
nothing calls this directly
no outgoing calls
no test coverage detected