diff options
| author | bors <bors@rust-lang.org> | 2013-10-23 09:41:14 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-10-23 09:41:14 -0700 |
| commit | f09959361b4ef44e11cfe94d4051ce7199bf129d (patch) | |
| tree | c9fb2cd8c9aa45ffb741310b19bb0440e3d8b302 | |
| parent | a4ec8af4c549bd806522826b756e18fbf0b5c47b (diff) | |
| parent | 870f3bc34140d07faaa4abe8dc21c016fb37eca6 (diff) | |
| download | rust-f09959361b4ef44e11cfe94d4051ce7199bf129d.tar.gz rust-f09959361b4ef44e11cfe94d4051ce7199bf129d.zip | |
auto merge of #10034 : sfackler/rust/time, r=alexcrichton
These are supposed to be raw C-like structs mirroring time.h's struct tm and struct timespec.
| -rw-r--r-- | src/libextra/time.rs | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/libextra/time.rs b/src/libextra/time.rs index 71569be3a81..f675c6f2392 100644 --- a/src/libextra/time.rs +++ b/src/libextra/time.rs @@ -34,7 +34,7 @@ pub mod rustrt { #[deriving(Clone, DeepClone, Eq, Encodable, Decodable)] -pub struct Timespec { priv sec: i64, priv nsec: i32 } +pub struct Timespec { sec: i64, nsec: i32 } /* * Timespec assumes that pre-epoch Timespecs have negative sec and positive * nsec fields. Darwin's and Linux's struct timespec functions handle pre- @@ -106,18 +106,18 @@ pub fn tzset() { #[deriving(Clone, DeepClone, Eq, Encodable, Decodable)] pub struct Tm { - priv tm_sec: i32, // seconds after the minute ~[0-60] - priv tm_min: i32, // minutes after the hour ~[0-59] - priv tm_hour: i32, // hours after midnight ~[0-23] - priv tm_mday: i32, // days of the month ~[1-31] - priv tm_mon: i32, // months since January ~[0-11] - priv tm_year: i32, // years since 1900 - priv tm_wday: i32, // days since Sunday ~[0-6] - priv tm_yday: i32, // days since January 1 ~[0-365] - priv tm_isdst: i32, // Daylight Savings Time flag - priv tm_gmtoff: i32, // offset from UTC in seconds - priv tm_zone: ~str, // timezone abbreviation - priv tm_nsec: i32, // nanoseconds + tm_sec: i32, // seconds after the minute ~[0-60] + tm_min: i32, // minutes after the hour ~[0-59] + tm_hour: i32, // hours after midnight ~[0-23] + tm_mday: i32, // days of the month ~[1-31] + tm_mon: i32, // months since January ~[0-11] + tm_year: i32, // years since 1900 + tm_wday: i32, // days since Sunday ~[0-6] + tm_yday: i32, // days since January 1 ~[0-365] + tm_isdst: i32, // Daylight Savings Time flag + tm_gmtoff: i32, // offset from UTC in seconds + tm_zone: ~str, // timezone abbreviation + tm_nsec: i32, // nanoseconds } pub fn empty_tm() -> Tm { |
