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

Wrong division operator in sleepms #7

Open
lubosures opened this issue Sep 15, 2021 · 0 comments
Open

Wrong division operator in sleepms #7

lubosures opened this issue Sep 15, 2021 · 0 comments

Comments

@lubosures
Copy link

The sleepms function is defined as

static void sleepms(unsigned int v) {
	usleep(v / 1000);
}

and is called from websocket_cb as

                if (count == 0) {
                        sleepms(50);
                        continue;
                }

Assuming sleepms means sleep-for-milliseconds the conversion to microseconds shall multiply the argument by 1000, not divide ?

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