diff options
| author | Chris Denton <chris@chrisdenton.dev> | 2023-11-21 23:42:51 +0000 |
|---|---|---|
| committer | Chris Denton <chris@chrisdenton.dev> | 2023-11-22 13:00:29 +0000 |
| commit | b962ae132440dd88b9795313b2bddf161d9abb52 (patch) | |
| tree | 2a1303471a4be6f3cd91a161a78995f4691fc2a4 /library/std/src/sys | |
| parent | 9e42456a0defc5839b505edfa5ec7f9d7aa3644f (diff) | |
duration_subsec
calling `subsec_micros()` is more concise than this calculation
Diffstat (limited to 'library/std/src/sys')
| -rw-r--r-- | library/std/src/sys/windows/net.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/sys/windows/net.rs b/library/std/src/sys/windows/net.rs index c29b863665f..6cd758ec5c3 100644 --- a/library/std/src/sys/windows/net.rs +++ b/library/std/src/sys/windows/net.rs @@ -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 { |
