about summary refs log tree commit diff
path: root/src/libtime
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-11-10 12:27:56 -0800
committerAlex Crichton <alex@alexcrichton.com>2014-11-12 09:18:35 -0800
commitfcd05ed99ff0aa6157e427a698ac53dbc450135f (patch)
tree62503d355c71c9daf045c0080912fe06ee2f5441 /src/libtime
parente4ead7b034c96b705ec34b8325f5f9f778f1cbb9 (diff)
downloadrust-fcd05ed99ff0aa6157e427a698ac53dbc450135f.tar.gz
rust-fcd05ed99ff0aa6157e427a698ac53dbc450135f.zip
time: Deprecate the library in the distribution
This commit deprecates the entire libtime library in favor of the
externally-provided libtime in the rust-lang organization. Users of the
`libtime` crate as-is today should add this to their Cargo manifests:

    [dependencies.time]
    git = "https://github.com/rust-lang/time"

To implement this transition, a new function `Duration::span` was added to the
`std::time::Duration` time. This function takes a closure and then returns the
duration of time it took that closure to execute. This interface will likely
improve with `FnOnce` unboxed closures as moving in and out will be a little
easier.

Due to the deprecation of the in-tree crate, this is a:

[breaking-change]

cc #18855, some of the conversions in the `src/test/bench` area may have been a
little nicer with that implemented
Diffstat (limited to 'src/libtime')
-rw-r--r--src/libtime/lib.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libtime/lib.rs b/src/libtime/lib.rs
index bbe6002717c..3211d03a7c0 100644
--- a/src/libtime/lib.rs
+++ b/src/libtime/lib.rs
@@ -11,7 +11,8 @@
 //! Simple time handling.
 
 #![crate_name = "time"]
-#![experimental]
+#![deprecated = "use the http://github.com/rust-lang/time crate instead"]
+#![allow(deprecated)]
 
 #![crate_type = "rlib"]
 #![crate_type = "dylib"]