Repository navigation
Conversation
libhal-util v5 had delay(steady_clock&, time_duration); the v6 port dropped it. Bring it back as a busy-wait on future_deadline(), for code that runs before a waiter is installed, such as libhal-arm-mcu v2's demos until its SysTick timer and WFI waiter are ported.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings back
hal::delay(hal::steady_clock&, hal::time_duration). libhal-util v5 has it; the v6 port dropped it.future_deadline(), the same as v5. It doesn't need a waiter, so it works before one is installed. libhal-arm-mcu v2's demos need it until the SysTick timer and WFI waiter are ported (review comment on 💥 v2 Port GPIO and the DWT counter to libhal 5.0.0-alpha.1 libhal-arm-mcu#225). Once a waiter is installed,hal::sleep_for()is better, because it lets the CPU idle.future_deadline().future_deadline()computes. The other checks that a zero duration waits one tick.Testing
macOS, LLVM 23, against libhal
5.0.0-alpha.2: 16/16 test suites pass.