about summary refs log tree commit diff
path: root/library/std/src/sys/pal/uefi/time.rs
AgeCommit message (Collapse)AuthorLines
2025-09-12Revert "Constify SystemTime methods"Ralf Jung-20/+7
This reverts commit 7ce620dd7c6fc3371290b40a1ea28146f0d37031. The const-hacks introduces bugs, and they make the code harder to maintain. Let's wait until we can constify these functions without changing their implementation.
2025-08-19Rollup merge of #145025 - lolbinarycat:ci-tidy-spellcheck, r=Kobzol许杰友 Jieyou Xu (Joe)-2/+2
run spellcheck as a tidy extra check in ci This is probably how it should've been done from the start. r? ``@Kobzol``
2025-08-16std: fix more typosbinarycat-2/+2
2025-08-16library: Migrate from `cfg_if` to `cfg_select`Josh Triplett-6/+3
Migrate the standard library from using the external `cfg_if` crate to using the now-built-in `cfg_select` macro. This does not yet eliminate the dependency from `library/std/Cargo.toml`, because while the standard library itself no longer uses `cfg_if`, it also incorporates the `backtrace` crate, which does. Migration assisted by the following vim command (after selecting the full `cfg_if!` invocation): ``` '<,'>s/\(cfg_if::\)\?cfg_if/cfg_select/ | '<,'>s/^\( *\)} else {/\1}\r\1_ => {/c | '<,'>s/^\( *\)} else if #\[cfg(\(.*\))\] /\1}\r\1\2 => /e | '<,'>s/if #\[cfg(\(.*\))\] {/\1 => {/e ``` This is imperfect, but substantially accelerated the process. This prompts for confirmation on the `} else {` since that can also appear inside one of the arms. This also requires manual intervention to handle any multi-line conditions.
2025-08-12Constify SystemTime methodsltdk-7/+20
2025-08-11std: sys: pal: uefi: tests: Add systemtime testsAyush Singh-18/+48
Add tests to ensure that extream system times are still representable. Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-08-11std: sys: pal: uefi: Overhaul TimeAyush Singh-18/+107
Use a time representation with 1900-01-01-00:00:00 at timezone -1440 min as anchor. This is the earliest time supported in UEFI. Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-04-27use generic Atomic type where possibleChristopher Durham-2/+2
in core/alloc/std only for now, and ignoring test files Co-authored-by: Pavel Grigorenko <GrigorenkoPV@ya.ru>
2025-02-21Replace some instances of `pub` with `pub(crate)`Trevor Gross-1/+1
The recent fixes to private dependencies exposed some cases in the UEFI module where private dependencies are exposed in a public interface. These do not need to be crate-public, so change them to `pub(crate)`.
2024-08-01std: Remove has_cpuidJubilee Young-8/+0
The one use of it was guaranteed to be always true.
2024-07-29Reformat `use` declarations.Nicholas Nethercote-2/+4
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-02-13Implement Instant for UEFIAyush Singh-0/+116
- Uses Timestamp Protocol if present. Else use rdtsc for x86 and x86-64 Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
2024-02-09Implement SystemTime for UEFIAyush Singh-0/+105
- Uses SystemTable->RuntimeServices->GetTime() Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>