Skip to content

Commit 78aeaa6

Browse files
committed
Hopefully fix unreliability in unistd::alarm's doc test
1 parent 37e0c10 commit 78aeaa6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/unistd.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1670,10 +1670,11 @@ pub mod alarm {
16701670
//! sigaction(Signal::SIGALRM, &sa);
16711671
//! }
16721672
//!
1673+
//! let start = Instant::now();
1674+
//!
16731675
//! // Set an alarm for 1 second from now.
16741676
//! alarm::set(1);
16751677
//!
1676-
//! let start = Instant::now();
16771678
//! // Pause the process until the alarm signal is received.
16781679
//! let mut sigset = SigSet::empty();
16791680
//! sigset.add(Signal::SIGALRM);

0 commit comments

Comments
 (0)