std: move time implementations to sys (VEX)
Now that the `unsupported` module exists, we can use it for VEX. VEX actually supports `Instant` though, so the implementation-select needs to combine that with the `unsupported` module.
This commit is contained in:
parent
29b16c0a55
commit
5978e19456
3 changed files with 10 additions and 6 deletions
|
|
@ -1,5 +1,4 @@
|
|||
pub mod os;
|
||||
pub mod time;
|
||||
|
||||
#[expect(dead_code)]
|
||||
#[path = "../unsupported/common.rs"]
|
||||
|
|
|
|||
|
|
@ -6,6 +6,16 @@ cfg_select! {
|
|||
mod sgx;
|
||||
use sgx as imp;
|
||||
}
|
||||
target_os = "vexos" => {
|
||||
mod vexos;
|
||||
#[expect(unused)]
|
||||
mod unsupported;
|
||||
|
||||
mod imp {
|
||||
pub use super::vexos::Instant;
|
||||
pub use super::unsupported::{SystemTime, UNIX_EPOCH};
|
||||
}
|
||||
}
|
||||
target_os = "xous" => {
|
||||
mod xous;
|
||||
use xous as imp;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,5 @@
|
|||
use crate::time::Duration;
|
||||
|
||||
#[expect(dead_code)]
|
||||
#[path = "../unsupported/time.rs"]
|
||||
mod unsupported_time;
|
||||
pub use unsupported_time::{SystemTime, UNIX_EPOCH};
|
||||
|
||||
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)]
|
||||
pub struct Instant(Duration);
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue