@@ -31,9 +31,10 @@ pub mod rustrt {
31
31
}
32
32
33
33
/// A record specifying a time value in seconds and nanoseconds.
34
- #[ deriving( Clone , DeepClone , Eq , Encodable , Decodable ) ]
35
- pub struct Timespec { sec : i64 , nsec : i32 }
36
34
35
+
36
+ #[ deriving( Clone , DeepClone , Eq , Encodable , Decodable ) ]
37
+ pub struct Timespec { priv sec: i64 , priv nsec : i32 }
37
38
/*
38
39
* Timespec assumes that pre-epoch Timespecs have negative sec and positive
39
40
* nsec fields. Darwin's and Linux's struct timespec functions handle pre-
@@ -105,18 +106,18 @@ pub fn tzset() {
105
106
106
107
#[ deriving( Clone , DeepClone , Eq , Encodable , Decodable ) ]
107
108
pub struct Tm {
108
- tm_sec : i32 , // seconds after the minute ~[0-60]
109
- tm_min : i32 , // minutes after the hour ~[0-59]
110
- tm_hour : i32 , // hours after midnight ~[0-23]
111
- tm_mday : i32 , // days of the month ~[1-31]
112
- tm_mon : i32 , // months since January ~[0-11]
113
- tm_year : i32 , // years since 1900
114
- tm_wday : i32 , // days since Sunday ~[0-6]
115
- tm_yday : i32 , // days since January 1 ~[0-365]
116
- tm_isdst : i32 , // Daylight Savings Time flag
117
- tm_gmtoff : i32 , // offset from UTC in seconds
118
- tm_zone : ~str , // timezone abbreviation
119
- tm_nsec : i32 , // nanoseconds
109
+ priv tm_sec : i32 , // seconds after the minute ~[0-60]
110
+ priv tm_min : i32 , // minutes after the hour ~[0-59]
111
+ priv tm_hour : i32 , // hours after midnight ~[0-23]
112
+ priv tm_mday : i32 , // days of the month ~[1-31]
113
+ priv tm_mon : i32 , // months since January ~[0-11]
114
+ priv tm_year : i32 , // years since 1900
115
+ priv tm_wday : i32 , // days since Sunday ~[0-6]
116
+ priv tm_yday : i32 , // days since January 1 ~[0-365]
117
+ priv tm_isdst : i32 , // Daylight Savings Time flag
118
+ priv tm_gmtoff : i32 , // offset from UTC in seconds
119
+ priv tm_zone : ~str , // timezone abbreviation
120
+ priv tm_nsec : i32 , // nanoseconds
120
121
}
121
122
122
123
pub fn empty_tm ( ) -> Tm {
0 commit comments