diff options
| author | Brian Anderson <banderson@mozilla.com> | 2014-08-01 18:05:26 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2014-08-13 11:31:48 -0700 |
| commit | a391934ba8fb99b999f9956e855316692612f1ab (patch) | |
| tree | 4d27c47c5a5302ef14e048b18deaa41b725df6f2 /src/libsync | |
| parent | 80d32438d665ae74ffb1bc5ad60f7329ed17f39a (diff) | |
| download | rust-a391934ba8fb99b999f9956e855316692612f1ab.tar.gz rust-a391934ba8fb99b999f9956e855316692612f1ab.zip | |
Fix various fallout from timer changes
Diffstat (limited to 'src/libsync')
| -rw-r--r-- | src/libsync/comm/mod.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libsync/comm/mod.rs b/src/libsync/comm/mod.rs index 45016b97566..e4df661b562 100644 --- a/src/libsync/comm/mod.rs +++ b/src/libsync/comm/mod.rs @@ -128,10 +128,11 @@ //! //! ```no_run //! use std::io::timer::Timer; +//! use std::time::Duration; //! //! let (tx, rx) = channel::<int>(); //! let mut timer = Timer::new().unwrap(); -//! let timeout = timer.oneshot(10000); +//! let timeout = timer.oneshot(Duration::seconds(10)); //! //! loop { //! select! { @@ -150,12 +151,13 @@ //! //! ```no_run //! use std::io::timer::Timer; +//! use std::time::Duration; //! //! let (tx, rx) = channel::<int>(); //! let mut timer = Timer::new().unwrap(); //! //! loop { -//! let timeout = timer.oneshot(5000); +//! let timeout = timer.oneshot(Duration::seconds(5)); //! //! select! { //! val = rx.recv() => println!("Received {}", val), |
