| 1 | cfg_select! { |
| 2 | target_os = "hermit" => { |
| 3 | mod hermit; |
| 4 | use hermit as imp; |
| 5 | } |
| 6 | target_os = "motor" => { |
| 7 | use moto_rt::time as imp; |
| 8 | } |
| 9 | all(target_vendor = "fortanix" , target_env = "sgx" ) => { |
| 10 | mod sgx; |
| 11 | use sgx as imp; |
| 12 | } |
| 13 | target_os = "solid_asp3" => { |
| 14 | mod solid; |
| 15 | use solid as imp; |
| 16 | } |
| 17 | target_os = "uefi" => { |
| 18 | mod uefi; |
| 19 | use uefi as imp; |
| 20 | } |
| 21 | any( |
| 22 | target_os = "teeos" , |
| 23 | target_family = "unix" , |
| 24 | target_os = "wasi" , |
| 25 | ) => { |
| 26 | mod unix; |
| 27 | use unix as imp; |
| 28 | } |
| 29 | target_os = "vexos" => { |
| 30 | mod vexos; |
| 31 | #[expect(unused)] |
| 32 | mod unsupported; |
| 33 | |
| 34 | mod imp { |
| 35 | pub use super::vexos::Instant; |
| 36 | pub use super::unsupported::{SystemTime, UNIX_EPOCH}; |
| 37 | } |
| 38 | } |
| 39 | target_os = "windows" => { |
| 40 | mod windows; |
| 41 | use windows as imp; |
| 42 | } |
| 43 | target_os = "xous" => { |
| 44 | mod xous; |
| 45 | use xous as imp; |
| 46 | } |
| 47 | _ => { |
| 48 | mod unsupported; |
| 49 | use unsupported as imp; |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | pub use imp::{Instant, SystemTime, UNIX_EPOCH}; |
| 54 | |