@@ -114,9 +114,9 @@ impl Duration {
114
114
#[ inline]
115
115
pub const fn from_millis ( millis : u64 ) -> Duration {
116
116
Duration {
117
- secs : millis / MILLIS_PER_SEC ,
118
- nanos : ( ( millis % MILLIS_PER_SEC ) as u32 ) * NANOS_PER_MILLI ,
119
- }
117
+ secs : millis / MILLIS_PER_SEC ,
118
+ nanos : ( ( millis % MILLIS_PER_SEC ) as u32 ) * NANOS_PER_MILLI ,
119
+ }
120
120
}
121
121
122
122
/// Creates a new `Duration` from the specified number of microseconds.
@@ -136,9 +136,9 @@ impl Duration {
136
136
#[ inline]
137
137
pub const fn from_micros ( micros : u64 ) -> Duration {
138
138
Duration {
139
- secs : micros / MICROS_PER_SEC ,
140
- nanos : ( ( micros % MICROS_PER_SEC ) as u32 ) * NANOS_PER_MICRO ,
141
- }
139
+ secs : micros / MICROS_PER_SEC ,
140
+ nanos : ( ( micros % MICROS_PER_SEC ) as u32 ) * NANOS_PER_MICRO ,
141
+ }
142
142
}
143
143
144
144
/// Creates a new `Duration` from the specified number of nanoseconds.
@@ -158,9 +158,9 @@ impl Duration {
158
158
#[ inline]
159
159
pub const fn from_nanos ( nanos : u64 ) -> Duration {
160
160
Duration {
161
- secs : nanos / ( NANOS_PER_SEC as u64 ) ,
162
- nanos : ( nanos % ( NANOS_PER_SEC as u64 ) ) as u32 ,
163
- }
161
+ secs : nanos / ( NANOS_PER_SEC as u64 ) ,
162
+ nanos : ( nanos % ( NANOS_PER_SEC as u64 ) ) as u32 ,
163
+ }
164
164
}
165
165
166
166
/// Returns the number of _whole_ seconds contained by this `Duration`.
0 commit comments