Skip to content

Commit 03aecda

Browse files
committed
use subdsec_micros() instead of subsec_nanos() / 1000
1 parent eda8d82 commit 03aecda

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libstd/sys/unix/net.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ impl Socket {
280280
};
281281
let mut timeout = libc::timeval {
282282
tv_sec: secs,
283-
tv_usec: (dur.subsec_nanos() / 1000) as libc::suseconds_t,
283+
tv_usec: dur.subsec_micros() as libc::suseconds_t,
284284
};
285285
if timeout.tv_sec == 0 && timeout.tv_usec == 0 {
286286
timeout.tv_usec = 1;

0 commit comments

Comments
 (0)