Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

throttling #48

Open
gabrielsroka opened this issue Dec 22, 2023 · 1 comment
Open

throttling #48

gabrielsroka opened this issue Dec 22, 2023 · 1 comment

Comments

@gabrielsroka
Copy link
Contributor

the UI has a Regulate Speed checkbox, that when checked calls

apple1js/js/apple1.ts

Lines 183 to 189 in 18f2fc7

export function toggleSpeed() {
throttling =
document.querySelector<HTMLInputElement>('#speed_toggle')!.checked;
if (runTimer) {
run();
}
}

which then does

apple1js/js/apple1.ts

Lines 208 to 214 in 18f2fc7

let ival = 30;
let step = 1023 * ival;
const stepMax = step;
if (!throttling) {
ival = 1;
}

but ival is changed and never read again. is it supposed to happen before step uses ival on line 209? does Regulate Speed do anything right now?

@gabrielsroka
Copy link
Contributor Author

is runTimer ever set?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant