You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a program that runs on a Raspberry Pi 4 and uses std::time::Instant. I want to change it to no_std so I can try and make it run on smaller devices. embedded-time::clock::Clock seems to be a no_std alternative to std::time::Instant.
However, Clock is just a trait and I can't figure out how to create an instance of it. Do I need to use an additional crate, perhaps specific to Raspberry Pi, that provides an implementation of Clock? How do I find such a crate? I tried searching crates.io for crates that depend on embedded-time, but there are many results and none seemed applicable.
For what it's worth, my program needs to repeatedly check how much time has passed since some start. So I don't need UTC or complex calendar logic or anything like that. embedded-time::timer::Timer::is_expired sounds ideal for me.
The text was updated successfully, but these errors were encountered:
I have a program that runs on a Raspberry Pi 4 and uses
std::time::Instant
. I want to change it tono_std
so I can try and make it run on smaller devices.embedded-time::clock::Clock
seems to be ano_std
alternative tostd::time::Instant
.However,
Clock
is just a trait and I can't figure out how to create an instance of it. Do I need to use an additional crate, perhaps specific to Raspberry Pi, that provides an implementation ofClock
? How do I find such a crate? I tried searchingcrates.io
for crates that depend onembedded-time
, but there are many results and none seemed applicable.For what it's worth, my program needs to repeatedly check how much time has passed since some start. So I don't need UTC or complex calendar logic or anything like that.
embedded-time::timer::Timer::is_expired
sounds ideal for me.The text was updated successfully, but these errors were encountered: