On Windows, this code:
let mut buf = [0u8;32];
let s = UdpSocket::bind(SocketAddr::V4(
SocketAddrV4::new(
Ipv4Addr::new(127,0,0,1), 0))).unwrap();
let start = ::time::SteadyTime::now();
let timeout = ::std::time::Duration::from_milis(10);
s.set_read_timeout(Some(timeout)).unwrap();
let _ = s.recv_from(&mut buf);
let end = ::time::SteadyTime::now();
println!("Duration: {:?}", end - start);
prints out:
Duration { secs: 0, nanos 528975956 }
I’m using Windows XP and rustc 1.5.0-nightly (20a6938c0 2015-10-16)
Is this a documented bug I can track? Couldn’t find it.