Workshop › Wolfenstein-style 3D Maze › Step 14 of 18
The goal will be to escape as fast as you can, so we count frames and show them as seconds in the top right.
```js
let frames
frames = 0
frames += 1
const seconds = (f) => (f / 60).toFixed(1)
ctx.fillStyle = 'white'
ctx.font = 'bold 16px sans-serif'
ctx.textAlign = 'right'
ctx.fillText('Time ' + seconds(frames), canvas.width - 10, 22)
```toFixed(1) writes a number with one digit after the dot: 1.0, 12.3.seconds is a short arrow function: (f) => ... returns what is after the arrow.player, write frames; in reset, set it to 0; at the top of update, add one.shade, write seconds.draw, write the time.Skills: Game states, The game loop