Skip to content

Commit fd90dfd

Browse files
committed
Fix conversion
1 parent 84f3db2 commit fd90dfd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/sys/time.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,10 @@ impl From<timespec> for TimeSpec {
6969

7070
impl From<Duration> for TimeSpec {
7171
fn from(duration: Duration) -> Self {
72-
TimeSpec(timespec { tv_sec: duration.as_secs() as i64, tv_nsec: duration.subsec_nanos() as i64 })
72+
TimeSpec(timespec {
73+
tv_sec: duration.as_secs() as time_t,
74+
tv_nsec: duration.subsec_nanos() as c_long
75+
})
7376
}
7477
}
7578

0 commit comments

Comments
 (0)