Skip to content

Conversation

@kilograham
Copy link
Contributor

No description provided.

@kilograham kilograham merged commit 1331c47 into develop Feb 13, 2023
@kilograham kilograham deleted the missing_host_func branch February 13, 2023 21:22
@kilograham kilograham added this to the 1.5.1 milestone Feb 13, 2023
PICO_WEAK_FUNCTION_DEF(busy_wait_ms)
void PICO_WEAK_FUNCTION_IMPL_NAME(busy_wait_ms)(uint32_t delay_ms) {
#if defined(__unix__) || defined(__APPLE__)
usleep(delay_ms * 1000);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://man7.org/linux/man-pages/man3/usleep.3.html says that usleep fails if "usec is greater than or equal to 1000000", which I guess means this busy_wait_ms function will fail if passed a delay_ms value >= 1000 ?
Is that something we ought to check for, or are we not really that concerned about the correct operation of "host platform mode"? 🤷‍♂️

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

Successfully merging this pull request may close these issues.

3 participants