INNER CODE UNIT · JavaScript
duration
hyperfy-xyz/hyperfy · src/core/libs/stats-gl/index.js:288
const duration = elapsed * 1e-6 // Convert nanoseconds to milliseconds
this.totalGpuDuration += duration
this.gl.deleteQuery(queryInfo.query)
this.gpuQueries.splice(index, 1) // Remove the processed query
}
}
})
}
update() {
if (this.info === undefined) {
this.processGpuQueries()
} else {
this.totalGpuDuration = this.info.render.timestamp
this.totalGpuDurationCompute = this.info.compute.timestamp
this.addToAverage(this.totalGpuDurationCompute, this.averageGpuCompute)
}