Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use CLOCK_BOOTTIME for Instant in Fuchsia/Android #132331

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Use CLOCK_BOOTTIME for Instant in Fuchsia/Android
Fuchsia and Android both want Instants to progress during periods of
suspension, and thus must use CLOCK_BOOTTIME as the backing reference
clock.
  • Loading branch information
Anirudh Mathukumilli committed Oct 30, 2024
commit 048ee71c304dadb31c481d24d013e2a52ec57e0d
4 changes: 4 additions & 0 deletions library/std/src/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,17 @@ use crate::sys_common::{FromInner, IntoInner};
/// | SOLID | `get_tim` |
/// | WASI | [__wasi_clock_time_get (Monotonic Clock)] |
/// | Windows | [QueryPerformanceCounter] |
/// | Android | [clock_gettime (Boottime Clock)] |
/// | Fuchsia | [zx_clock_get_boot] |
///
/// [currently]: crate::io#platform-specific-behavior
/// [QueryPerformanceCounter]: https://docs.microsoft.com/en-us/windows/win32/api/profileapi/nf-profileapi-queryperformancecounter
/// [`insecure_time` usercall]: https://edp.fortanix.com/docs/api/fortanix_sgx_abi/struct.Usercalls.html#method.insecure_time
/// [timekeeping in SGX]: https://edp.fortanix.com/docs/concepts/rust-std/#codestdtimecode
/// [__wasi_clock_time_get (Monotonic Clock)]: https://github.com/WebAssembly/WASI/blob/main/legacy/preview1/docs.md#clock_time_get
/// [clock_gettime (Monotonic Clock)]: https://linux.die.net/man/3/clock_gettime
/// [clock_gettime (Boottime Clock)]: https://linux.die.net/man/2/clock_gettime
/// [zx_clock_get_boot]: https://fuchsia.dev/reference/syscalls/clock_get_boot
///
/// **Disclaimer:** These system calls might change over time.
///
Expand Down
Loading