mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 02:33:55 +00:00
use subdsec_micros() instead of subsec_nanos() / 1000
This commit is contained in:
parent
eda8d82b95
commit
03aecda83a
@ -280,7 +280,7 @@ impl Socket {
|
||||
};
|
||||
let mut timeout = libc::timeval {
|
||||
tv_sec: secs,
|
||||
tv_usec: (dur.subsec_nanos() / 1000) as libc::suseconds_t,
|
||||
tv_usec: dur.subsec_micros() as libc::suseconds_t,
|
||||
};
|
||||
if timeout.tv_sec == 0 && timeout.tv_usec == 0 {
|
||||
timeout.tv_usec = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user