about summary refs log tree commit diff
path: root/library/std/src/sys/hermit/time.rs
AgeCommit message (Collapse)AuthorLines
2023-02-24add support of RustyHermit's BSD socket layerStefan Lankes-15/+83
RustHermit publishs a new kernel interface and supports a common BSD socket layer. By supporting this interface, the implementation can be harmonized to other operating systems. To realize this socket layer, the handling of file descriptors is also harmonized to other operating systems.
2022-05-09Use Rust 2021 prelude in std itself.Mara Bos-1/+0
2022-02-13make Instant::{duration_since, elapsed, sub} saturating and remove workaroundsThe8472-8/+0
This removes all mutex/atomics based workarounds for non-monotonic clocks and makes the previously panicking methods saturating instead. Effectively this moves the monotonization from `Instant` construction to the comparisons. This has some observable effects, especially on platforms without monotonic clocks: * Incorrectly ordered Instant comparisons no longer panic. This may hide some programming errors until someone actually looks at the resulting `Duration` * `checked_duration_since` will now return `None` in more cases. Previously it only happened when one compared instants obtained in the wrong order or manually created ones. Now it also does on backslides. The upside is reduced complexity and lower overhead of `Instant::now`.
2020-07-27mv std libs to library/mark-0/+165