2个版本
使用旧的Rust 2015
0.1.1 | 2018年7月28日 |
---|---|
0.1.0 | 2018年7月28日 |
#449 in 日期和时间
2,717 每月下载量
7KB
持续时间
此crate定义了几个在实践(或很少)中常用的Duration
常量。
使用示例
extern crate durations;
use durations::{SECOND as S, MILLISECOND as MS};
std::thread::sleep(2*S + 200*MS);
// or alternatively
std::thread::sleep(2.2*S);
许可证
所有crate均受以下其中之一许可
任选其一。
贡献
除非您明确表示,否则根据Apache-2.0许可证定义的,您有意提交的任何贡献,包括在作品中,应按上述方式双许可,不附加任何额外条款或条件。
lib.rs
:
此crate定义了几个在实践(或很少)中常用的Duration
常量。
使用示例
extern crate durations;
use durations::{SECOND as S, MILLISECOND as MS};
std::thread::sleep(2*S + 200*MS);
// or alternatively
std::thread::sleep(2.2*S);