6 个版本

使用旧的 Rust 2015

0.0.7 2016 年 5 月 14 日
0.0.6 2015 年 8 月 6 日
0.0.5 2015 年 3 月 3 日
0.0.4 2015 年 1 月 21 日

#341日期和时间

Download history 825/week @ 2024-03-03 1021/week @ 2024-03-10 968/week @ 2024-03-17 952/week @ 2024-03-24 790/week @ 2024-03-31 655/week @ 2024-04-07 935/week @ 2024-04-14 1018/week @ 2024-04-21 1121/week @ 2024-04-28 745/week @ 2024-05-05 775/week @ 2024-05-12 879/week @ 2024-05-19 966/week @ 2024-05-26 1208/week @ 2024-06-02 552/week @ 2024-06-09 819/week @ 2024-06-16

3,643 每月下载量
用于 29 个 Crates(27 个直接使用)

MIT 许可证

3KB
65

rust-stopwatch

这是一个用于在 Rust 中计时的简单模块。

Build Status

示例

extern crate stopwatch;
use stopwatch::{Stopwatch};
// ...
let sw = Stopwatch::start_new();
// do something that takes some time
println!("Thing took {}ms", sw.elapsed_ms());

方法

fn new() -> Stopwatch
fn start_new() -> Stopwatch
fn start(&mut self)
fn stop(&mut self)
fn reset(&mut self)
fn restart(&mut self)
fn is_running(&self) -> bool
fn elapsed(&self) -> Duration
fn elapsed_ms(&self) -> i64

依赖项

~465KB