duration_subsec
calling `subsec_micros()` is more concise than this calculation
This commit is contained in:
parent
9e42456a0d
commit
b962ae1324
1 changed files with 1 additions and 1 deletions
|
@ -162,7 +162,7 @@ impl Socket {
|
|||
|
||||
let mut timeout = c::timeval {
|
||||
tv_sec: cmp::min(timeout.as_secs(), c_long::MAX as u64) as c_long,
|
||||
tv_usec: (timeout.subsec_nanos() / 1000) as c_long,
|
||||
tv_usec: timeout.subsec_micros() as c_long,
|
||||
};
|
||||
|
||||
if timeout.tv_sec == 0 && timeout.tv_usec == 0 {
|
||||
|
|
Loading…
Add table
Reference in a new issue