diff options
author | Alan Somers <asomers@gmail.com> | 2021-06-12 15:24:14 -0600 |
---|---|---|
committer | Alan Somers <asomers@gmail.com> | 2021-06-12 15:24:14 -0600 |
commit | 78aeaa6a5fc6b9c7ef7a8055a1660df91b09db34 (patch) | |
tree | b7c3077c1e510c5ad2da04d8f07d570f2cd5ec5a /src/unistd.rs | |
parent | 37e0c10f3c119b3455213ff183b637b534ad46f3 (diff) | |
download | nix-78aeaa6a5fc6b9c7ef7a8055a1660df91b09db34.zip |
Hopefully fix unreliability in unistd::alarm's doc test
Diffstat (limited to 'src/unistd.rs')
-rw-r--r-- | src/unistd.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/unistd.rs b/src/unistd.rs index d406efe8..ed3b753a 100644 --- a/src/unistd.rs +++ b/src/unistd.rs @@ -1670,10 +1670,11 @@ pub mod alarm { //! sigaction(Signal::SIGALRM, &sa); //! } //! + //! let start = Instant::now(); + //! //! // Set an alarm for 1 second from now. //! alarm::set(1); //! - //! let start = Instant::now(); //! // Pause the process until the alarm signal is received. //! let mut sigset = SigSet::empty(); //! sigset.add(Signal::SIGALRM); |