Skip to content

Commit

Permalink
host build: optimistic_yield() wrongly delays() instead of avoiding e…
Browse files Browse the repository at this point in the history
…xcessive yields (#6802)

* optimistic_yield is a yield, not a delay, and avoids yielding if last yield has occurred recently enough.

* Suppress an unused argument warning.

Co-authored-by: Earle F. Philhower, III <earlephilhower@yahoo.com>
  • Loading branch information
dok-net and earlephilhower committed Jan 28, 2020
1 parent 7b0fa35 commit bb696dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/host/common/Arduino.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ extern "C" bool can_yield()

extern "C" void optimistic_yield (uint32_t interval_us)
{
usleep(interval_us);
(void)interval_us;
}

extern "C" void esp_yield()
Expand Down

0 comments on commit bb696dd

Please sign in to comment.