We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d8e615e commit ac2ac4cCopy full SHA for ac2ac4c
src/sys/socket/mod.rs
@@ -511,7 +511,8 @@ pub enum ControlMessage<'a> {
511
/// let time1 = SystemTime::now();
512
/// // the packet's received timestamp should lie in-between the two system
513
/// // times, unless the system clock was adjusted in the meantime.
514
- /// let rduration = Duration::from_micros(rtime.num_microseconds() as u64);
+ /// let rduration = Duration::new(rtime.tv_sec() as u64,
515
+ /// rtime.tv_usec() as u32 * 1000);
516
/// assert!(time0.duration_since(UNIX_EPOCH).unwrap() <= rduration);
517
/// assert!(rduration <= time1.duration_since(UNIX_EPOCH).unwrap());
518
/// // Close socket
0 commit comments