This does not make any difference in the concrete example
(linux-embedded-hal's delay is implemented in terms of std::thread), but
it removes a stone from the path of people who start from the example
towards an actual use of embedded hal. (They'll still have to find
suitable replacements for env_hal and linux_embedded_hal, but that's
the parts that have to be.)
There are obviously many ways in which an example works. I think that this is a slight improvement, but if you disagree, feel free to just close this PR.
This does not make any difference in the concrete example (linux-embedded-hal's delay is implemented in terms of std::thread), but it removes a stone from the path of people who start from the example towards an actual use of embedded hal. (They'll still have to find suitable replacements for env_hal and linux_embedded_hal, but that's the parts that have to be.)
There are obviously many ways in which an example works. I think that this is a slight improvement, but if you disagree, feel free to just close this PR.
(The core::Duration stays in there because the lib uses Duration, and embedded-hal delays don't work with that, see https://github.com/rust-embedded/embedded-hal/issues/59).