Docs.rs
pi_time-0.5.2
Platform
i686-pc-windows-msvc
i686-unknown-linux-gnu
x86_64-apple-darwin
x86_64-pc-windows-msvc
x86_64-unknown-linux-gnu
Feature flags
docs.rs
About docs.rs
Badges
Builds
Metadata
Shorthand URLs
Download
Rustdoc JSON
Build queue
Privacy policy
Rust
Rust website
The Book
Standard Library API Reference
Rust by Example
The Cargo Guide
Clippy Documentation
pi_time 0.5.2
The library is used to obtain the time and is not affected by the system modification time
Crate
Source
Builds
Feature flags
Documentation
Coverage
85.19%
23
out of
27
items documented
6
out of
22
items with examples
Size
Source code size: 53.12 kB
This is the summed size of all the files inside the crates.io package for this release.
Documentation size: 2.14 MB
This is the summed size of all files generated by rustdoc for all configured targets
Links
GaiaWorld/pi_time
0
0
0
crates.io
Dependencies
ctor ^0.2
normal
lazy_static ^1.4
normal
crossbeam-channel ^0.5
dev
libc ^0.2
normal
js-sys ^0.3
normal
ordered-float ^3.0
normal
web-sys ^0.3
normal
wasi ^0.7
normal
Versions
0.5.2
(2025-09-22)
0.5.1
(2024-11-15)
0.5.0
(2024-10-14)
0.3.4
(2023-08-22)
0.3.3
(2023-07-17)
0.3.2
(2023-07-17)
0.3.1
(2023-07-17)
0.3.0
(2023-07-17)
0.2.7
(2023-06-07)
0.2.6
(2023-01-10)
0.2.5
(2023-01-10)
0.2.3
(2022-12-19)
0.2.2
(2022-09-27)
0.2.1
(2022-09-27)
0.2.0
(2022-09-26)
0.1.0
(2022-03-01)
Owners
pi_time
该库用于获取时间,不受系统修改时间的影响
采用进程启动时记录启动时间(对齐到秒),然后获取时间时,返回启动后的时间+启动时间
时刻在创建时始终保证不小于任何先前测量的时刻,并且通常对测量基准或计时操作所需时间等任务很有用。
但是请注意,不能保证瞬间是稳定的。换句话说,底层时钟的每个滴答声的长度可能不同(例如,某些秒可能比其他秒长)。一个瞬间可能会向前跳跃或经历时间膨胀(减速或加速),但它永远不会倒退。