about summary refs log tree commit diff
path: root/library/std/src/sys/wasi/time.rs
AgeCommit message (Collapse)AuthorLines
2024-01-11std: begin moving platform support modules into `pal`joboet-65/+0
2022-10-01Error instead of panicking when setting file times if the passed ↵beetrees-2/+2
`SystemTime` doesn't fit into the required type
2022-07-15Support setting file accessed/modified timestampsJosh Triplett-0/+4
Add `struct FileTimes` to contain the relevant file timestamps, since most platforms require setting all of them at once. (This also allows for future platform-specific extensions such as setting creation time.) Add `File::set_file_time` to set the timestamps for a `File`. Implement the `sys` backends for UNIX, macOS (which needs to fall back to `futimes` before macOS 10.13 because it lacks `futimens`), Windows, and WASI.
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`.
2022-01-28wasi: update to wasi 0.11.0Harald Hoyer-1/+1
To make use of `sock_accept()`, update the wasi crate to `0.11.0`. Signed-off-by: Harald Hoyer <harald@profian.com>
2020-09-03Applied `#![deny(unsafe_op_in_unsafe_fn)]` in library/std/src/wasiAmjad Alsharafi-0/+2
All refactoring needed was only in `alloc.rs`, changed part of the code in `alloc` method to satisfy the SAFETY statement
2020-07-27mv std libs to library/mark-0/+67