Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Add embed::poll_for(timer&, timeout, poll_function) #255

Closed
kammce opened this issue Jun 4, 2022 · 1 comment
Closed

Add embed::poll_for(timer&, timeout, poll_function) #255

kammce opened this issue Jun 4, 2022 · 1 comment

Comments

@kammce
Copy link
Contributor

kammce commented Jun 4, 2022

Provides a utility that polls a function for a duration of time and if that time is exceeded, then the function returns and error, otherwise it return success. In this case, an atomic variable is used to detect if the time has been exceeded. The atomic variable is set to 0. embed::timer would schedule itself with a function that flips an atomic flag to a value, lets say 1. If the poll function does not finish before the atomic flag is set to 1, then return with an error. Otherwise return success.

@kammce kammce added the utility label Jun 4, 2022
@kammce
Copy link
Contributor Author

kammce commented Jun 20, 2022

Obsolete by libhal/libhal-util#23

@kammce kammce closed this as not planned Won't fix, can't repro, duplicate, stale Jun 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant