Skip to content
This repository was archived by the owner on Jun 19, 2025. It is now read-only.
This repository was archived by the owner on Jun 19, 2025. It is now read-only.

Better implementation of setInterval #23

@gabeno

Description

@gabeno

The introduction to the function setInterval says: setInterval(func, n) is a way to run a function every n milliseconds yet during implementation n has to be computed like so:

// Draw twenty frames per second (20 * 50 = 1000 milliseconds)
setInterval(frame, 50);

This is confusing. For consistency we could have the function take in millisecond units or have an explanation for the conversion.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions