Skip to content

Commit ac2ac4c

Browse files
committed
Fix test on 1.24.0
1 parent d8e615e commit ac2ac4c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/sys/socket/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,8 @@ pub enum ControlMessage<'a> {
511511
/// let time1 = SystemTime::now();
512512
/// // the packet's received timestamp should lie in-between the two system
513513
/// // times, unless the system clock was adjusted in the meantime.
514-
/// let rduration = Duration::from_micros(rtime.num_microseconds() as u64);
514+
/// let rduration = Duration::new(rtime.tv_sec() as u64,
515+
/// rtime.tv_usec() as u32 * 1000);
515516
/// assert!(time0.duration_since(UNIX_EPOCH).unwrap() <= rduration);
516517
/// assert!(rduration <= time1.duration_since(UNIX_EPOCH).unwrap());
517518
/// // Close socket

0 commit comments

Comments
 (0)