nose-pluto/src/js/vram.ts
2025-10-01 22:16:38 -07:00

22 lines
491 B
TypeScript

////
// Fun vram counter at startup.
import { $ } from "./dom"
const vramCounter = $("vram-size")!
export const startVramCounter = () => {
const timer = setInterval(() => {
const count = parseInt(vramCounter.textContent!) + 1
let val = count + "KB"
if (count < 10)
val = "0" + val
vramCounter.textContent = val
if (count >= 64) {
vramCounter.textContent += " OK"
clearInterval(timer)
}
}, 15)
}