aboutsummaryrefslogtreecommitdiff
path: root/examples/stopwatch.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/stopwatch.rs')
-rw-r--r--examples/stopwatch.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/examples/stopwatch.rs b/examples/stopwatch.rs
index 98895c5..3a7578e 100644
--- a/examples/stopwatch.rs
+++ b/examples/stopwatch.rs
@@ -33,11 +33,7 @@ fn main() {
// Prints the elapsed time.
fn show(dur: Duration) {
- println!(
- "Elapsed: {}.{:03} sec",
- dur.as_secs(),
- dur.subsec_nanos() / 1_000_000
- );
+ println!("Elapsed: {}.{:03} sec", dur.as_secs(), dur.subsec_millis());
}
let start = Instant::now();