Crates.io | xous-api-ticktimer |
lib.rs | xous-api-ticktimer |
version | |
source | src |
created_at | 2022-10-02 19:12:59.741738 |
updated_at | 2024-12-02 11:16:48.13409 |
description | Provide high-resolution, non-rollover system time |
homepage | https://betrusted.io/xous-book/ |
repository | https://github.com/betrusted-io/xous-core/ |
max_upload_size | |
id | 678529 |
Cargo.toml error: | TOML parse error at line 21, column 1 | 21 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
The Xous ticktimer
helps other processes track the passage of time through several mechanisms:
Processes that are blocked by ticktimer
are entirely de-scheduled and consume no CPU
quantum; the only overhead is a few instructions to check the processes' runnability
state in the kernel's simple round-robin thread scheduler. Thus sleep
and condvar
blocking states are very efficient.
ticktimer
's perception of time stops when a system goes into the suspend state;
thus on resume, the elapsed time picks up exactly where it left off. Wall-clock time
during suspend is tracked by the RTC module.
Xous currently has no notions of thread priority, but if it were to develop one,
the ticktimer
would be the logical place to implement such a feature, as it has
a full view of all the waiting and runnable threads, and it can influence which ones
should be unblocked at a given quantum.