about summary refs log tree commit diff
path: root/src/libtime
diff options
context:
space:
mode:
authorSteve Klabnik <steve@steveklabnik.com>2014-11-24 20:06:06 -0500
committerSteve Klabnik <steve@steveklabnik.com>2014-11-25 21:24:16 -0500
commitf38e4e6d97bf1691858d007afd36b1f356de4774 (patch)
tree8b7da6e5965cfdd680908d294bb6814b14b36298 /src/libtime
parent689ef2dabfa3b2b379c953e5fb68ce2c805c2231 (diff)
downloadrust-f38e4e6d97bf1691858d007afd36b1f356de4774.tar.gz
rust-f38e4e6d97bf1691858d007afd36b1f356de4774.zip
/** -> ///
This is considered good convention.
Diffstat (limited to 'src/libtime')
-rw-r--r--src/libtime/lib.rs70
1 files changed, 27 insertions, 43 deletions
diff --git a/src/libtime/lib.rs b/src/libtime/lib.rs
index 062035c23f9..135c8a72808 100644
--- a/src/libtime/lib.rs
+++ b/src/libtime/lib.rs
@@ -123,10 +123,8 @@ impl Sub<Timespec, Duration> for Timespec {
     }
 }
 
-/**
- * Returns the current time as a `timespec` containing the seconds and
- * nanoseconds since 1970-01-01T00:00:00Z.
- */
+/// Returns the current time as a `timespec` containing the seconds and
+/// nanoseconds since 1970-01-01T00:00:00Z.
 pub fn get_time() -> Timespec {
     unsafe {
         let (sec, nsec) = os_get_time();
@@ -171,10 +169,8 @@ pub fn get_time() -> Timespec {
 }
 
 
-/**
- * Returns the current value of a high-resolution performance counter
- * in nanoseconds since an unspecified epoch.
- */
+/// Returns the current value of a high-resolution performance counter
+/// in nanoseconds since an unspecified epoch.
 pub fn precise_time_ns() -> u64 {
     return os_precise_time_ns();
 
@@ -218,10 +214,8 @@ pub fn precise_time_ns() -> u64 {
 }
 
 
-/**
- * Returns the current value of a high-resolution performance counter
- * in seconds since an unspecified epoch.
- */
+/// Returns the current value of a high-resolution performance counter
+/// in seconds since an unspecified epoch.
 pub fn precise_time_s() -> f64 {
     return (precise_time_ns() as f64) / 1000000000.;
 }
@@ -346,12 +340,10 @@ impl Tm {
         at_utc(self.to_timespec())
     }
 
-    /**
-     * Returns a TmFmt that outputs according to the `asctime` format in ISO
-     * C, in the local timezone.
-     *
-     * Example: "Thu Jan  1 00:00:00 1970"
-     */
+    /// Returns a TmFmt that outputs according to the `asctime` format in ISO
+    /// C, in the local timezone.
+    ///
+    /// Example: "Thu Jan  1 00:00:00 1970"
     pub fn ctime(&self) -> TmFmt {
         TmFmt {
             tm: self,
@@ -359,12 +351,10 @@ impl Tm {
         }
     }
 
-    /**
-     * Returns a TmFmt that outputs according to the `asctime` format in ISO
-     * C.
-     *
-     * Example: "Thu Jan  1 00:00:00 1970"
-     */
+    /// Returns a TmFmt that outputs according to the `asctime` format in ISO
+    /// C.
+    ///
+    /// Example: "Thu Jan  1 00:00:00 1970"
     pub fn asctime(&self) -> TmFmt {
         TmFmt {
             tm: self,
@@ -380,12 +370,10 @@ impl Tm {
         })
     }
 
-    /**
-     * Returns a TmFmt that outputs according to RFC 822.
-     *
-     * local: "Thu, 22 Mar 2012 07:53:18 PST"
-     * utc:   "Thu, 22 Mar 2012 14:53:18 GMT"
-     */
+    /// Returns a TmFmt that outputs according to RFC 822.
+    ///
+    /// local: "Thu, 22 Mar 2012 07:53:18 PST"
+    /// utc:   "Thu, 22 Mar 2012 14:53:18 GMT"
     pub fn rfc822(&self) -> TmFmt {
         if self.tm_gmtoff == 0_i32 {
             TmFmt {
@@ -400,12 +388,10 @@ impl Tm {
         }
     }
 
-    /**
-     * Returns a TmFmt that outputs according to RFC 822 with Zulu time.
-     *
-     * local: "Thu, 22 Mar 2012 07:53:18 -0700"
-     * utc:   "Thu, 22 Mar 2012 14:53:18 -0000"
-     */
+    /// Returns a TmFmt that outputs according to RFC 822 with Zulu time.
+    ///
+    /// local: "Thu, 22 Mar 2012 07:53:18 -0700"
+    /// utc:   "Thu, 22 Mar 2012 14:53:18 -0000"
     pub fn rfc822z(&self) -> TmFmt {
         TmFmt {
             tm: self,
@@ -413,13 +399,11 @@ impl Tm {
         }
     }
 
-    /**
-     * Returns a TmFmt that outputs according to RFC 3339. RFC 3339 is
-     * compatible with ISO 8601.
-     *
-     * local: "2012-02-22T07:53:18-07:00"
-     * utc:   "2012-02-22T14:53:18Z"
-     */
+    /// Returns a TmFmt that outputs according to RFC 3339. RFC 3339 is
+    /// compatible with ISO 8601.
+    ///
+    /// local: "2012-02-22T07:53:18-07:00"
+    /// utc:   "2012-02-22T14:53:18Z"
     pub fn rfc3339<'a>(&'a self) -> TmFmt {
         TmFmt {
             tm: self,