Implement time feature

This commit is contained in:
chemicstry
2022-10-24 11:38:15 +03:00
parent 4ce4131f8b
commit d99841fea9
5 changed files with 9 additions and 2 deletions

View File

@ -439,6 +439,7 @@ impl From<Timeout> for [u8; 3] {
}
}
#[cfg(feature = "time")]
impl From<Timeout> for embassy_time::Duration {
fn from(to: Timeout) -> Self {
embassy_time::Duration::from_micros(to.as_micros().into())