Skip to content

Commit

Permalink
doc: update example, fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
xu-cheng committed Apr 19, 2020
1 parent 2b5ed72 commit cd5796d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ println!("{:?} have passed.", timer.elapsed());

let timer = howlong::ProcessCPUTimer::new();
// do other computations
println!("{}", timer.elapsed());
println!("{}", timer.elapsed()); // 5.71s wall, 5.70s user + 0ns system = 5.70s CPU (99.8%)
```

## License
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
//!
//! let timer = howlong::ProcessCPUTimer::new();
//! // do other computations
//! println!("{}", timer.elapsed());
//! println!("{}", timer.elapsed()); // 5.71s wall, 5.70s user + 0ns system = 5.70s CPU (99.8%)
//! ```
mod types;
Expand Down
8 changes: 3 additions & 5 deletions src/timer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@
//! # Examples
//!
//! ```
//! use howlong::*;
//!
//! let timer = HighResolutionTimer::new();
//! let timer = howlong::HighResolutionTimer::new();
//! // do some computations
//! println!("{:?} have passed.", timer.elapsed());
//!
//! let timer = ProcessCPUTimer::new();
//! let timer = howlong::ProcessCPUTimer::new();
//! // do other computations
//! println!("{}", timer.elapsed());
//! println!("{}", timer.elapsed()); // 5.71s wall, 5.70s user + 0ns system = 5.70s CPU (99.8%)
//! ```
use crate::{clock::*, Clock, Duration, ProcessDuration, ProcessTimePoint, TimePoint};
Expand Down
2 changes: 1 addition & 1 deletion src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub enum Error {
ClkFreqTooHigh,
}

/// Alias to `core::result::Result<T, katex::Error>`
/// Alias to `core::result::Result<T, howlong::Error>`
pub type Result<T> = core::result::Result<T, Error>;

pub use core::time::Duration;
Expand Down

0 comments on commit cd5796d

Please sign in to comment.