Skip to content

Commit

Permalink
Stabilize SystemTime::UNIX_EPOCH
Browse files Browse the repository at this point in the history
  • Loading branch information
tmccombs committed May 29, 2018
1 parent 5bf68db commit 855ec8b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/libstd/time.rs
Expand Up @@ -271,15 +271,14 @@ impl SystemTime {
/// # Examples
///
/// ```no_run
/// #![feature(assoc_unix_epoch)]
/// use std::time::SystemTime;
///
/// match SystemTime::now().duration_since(SystemTime::UNIX_EPOCH) {
/// Ok(n) => println!("1970-01-01 00:00:00 UTC was {} seconds ago!", n.as_secs()),
/// Err(_) => panic!("SystemTime before UNIX EPOCH!"),
/// }
/// ```
#[unstable(feature = "assoc_unix_epoch", issue = "49502")]
#[stable(feature = "assoc_unix_epoch", since = "1.28.0")]
pub const UNIX_EPOCH: SystemTime = UNIX_EPOCH;

/// Returns the system time corresponding to "now".
Expand Down

0 comments on commit 855ec8b

Please sign in to comment.