diff options
author | Alan Somers <asomers@gmail.com> | 2021-06-12 16:22:14 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-12 16:22:14 -0600 |
commit | a6405688352143d5a4b59368fad6218cefe7013d (patch) | |
tree | 7d987ea8f83628bfdac328847f074996d5afec98 /src | |
parent | ed8783fa3a67d55acf9468cff14afa3213bbbaa8 (diff) | |
parent | 78aeaa6a5fc6b9c7ef7a8055a1660df91b09db34 (diff) | |
download | nix-a6405688352143d5a4b59368fad6218cefe7013d.zip |
Merge pull request #1450 from asomers/alarm-errors
Hopefully fix unreliability in unistd::alarm's doc test
Diffstat (limited to 'src')
-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); |