()
| 1833 | } |
| 1834 | |
| 1835 | refreshDisplay() { |
| 1836 | const now = typeof performance !== "undefined" ? performance.now() : Date.now(); |
| 1837 | const timeSinceLastFrame = |
| 1838 | this.lastFrameTimestamp > 0 ? now - this.lastFrameTimestamp : Number.POSITIVE_INFINITY; |
| 1839 | |
| 1840 | if (!Number.isFinite(timeSinceLastFrame) || timeSinceLastFrame > 600) { |
| 1841 | this.valueElement.textContent = "idle"; |
| 1842 | this.currentFps = null; |
| 1843 | return; |
| 1844 | } |
| 1845 | |
| 1846 | if (this.currentFps !== null) { |
| 1847 | this.valueElement.textContent = `${this.currentFps} fps`; |
| 1848 | } else { |
| 1849 | this.valueElement.textContent = "— fps"; |
| 1850 | } |
| 1851 | } |
| 1852 | } |
| 1853 | |
| 1854 | class NeuralVisualizer { |
no outgoing calls
no test coverage detected