diff options
| author | Steven Fackler <sfackler@gmail.com> | 2015-07-05 23:20:00 -0700 |
|---|---|---|
| committer | Steven Fackler <sfackler@gmail.com> | 2015-08-10 20:04:18 -0400 |
| commit | 999bdeca88a06938ac1e1c608091d3afe4d7e173 (patch) | |
| tree | 57274f8e644a2823864cd2d10f938719b0ec9fa2 /src/libtest | |
| parent | af32c015aa6fa33cbbc2986e7f72e5c83f242c35 (diff) | |
| download | rust-999bdeca88a06938ac1e1c608091d3afe4d7e173.tar.gz rust-999bdeca88a06938ac1e1c608091d3afe4d7e173.zip | |
Stabilize the Duration API
This commit stabilizes the `std::time` module and the `Duration` type. `Duration::span` remains unstable, and the `Display` implementation for `Duration` has been removed as it is still being reworked and all trait implementations for stable types are de facto stable. This is a [breaking-change] to those using `Duration`'s `Display` implementation.
Diffstat (limited to 'src/libtest')
| -rw-r--r-- | src/libtest/lib.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs index 7777ea51f82..a7fb88215b7 100644 --- a/src/libtest/lib.rs +++ b/src/libtest/lib.rs @@ -36,7 +36,6 @@ #![feature(asm)] #![feature(box_syntax)] -#![feature(duration)] #![feature(duration_span)] #![feature(fnbox)] #![feature(iter_cmp)] @@ -1105,7 +1104,7 @@ impl Bencher { } pub fn ns_elapsed(&mut self) -> u64 { - self.dur.secs() * 1_000_000_000 + (self.dur.extra_nanos() as u64) + self.dur.as_secs() * 1_000_000_000 + (self.dur.subsec_nanos() as u64) } pub fn ns_per_iter(&mut self) -> u64 { |
