about summary refs log tree commit diff
path: root/src/libstd/time
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/time')
-rw-r--r--src/libstd/time/duration.rs16
1 files changed, 0 insertions, 16 deletions
diff --git a/src/libstd/time/duration.rs b/src/libstd/time/duration.rs
index 7ecb3920cc8..7c3240b4a40 100644
--- a/src/libstd/time/duration.rs
+++ b/src/libstd/time/duration.rs
@@ -9,7 +9,6 @@
 // except according to those terms.
 
 use ops::{Add, Sub, Mul, Div};
-use time::Instant;
 
 const NANOS_PER_SEC: u32 = 1_000_000_000;
 const NANOS_PER_MILLI: u32 = 1_000_000;
@@ -59,21 +58,6 @@ impl Duration {
         Duration { secs: secs, nanos: nanos }
     }
 
-    /// Runs a closure, returning the duration of time it took to run the
-    /// closure.
-    #[unstable(feature = "duration_span",
-               reason = "unsure if this is the right API or whether it should \
-                         wait for a more general \"moment in time\" \
-                         abstraction",
-               issue = "27799")]
-    #[rustc_deprecated(reason = "use std::time::Instant instead",
-                       since = "1.6.0")]
-    pub fn span<F>(f: F) -> Duration where F: FnOnce() {
-        let start = Instant::now();
-        f();
-        start.elapsed()
-    }
-
     /// Creates a new `Duration` from the specified number of seconds.
     #[stable(feature = "duration", since = "1.3.0")]
     pub fn from_secs(secs: u64) -> Duration {