about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-08-23 05:16:21 -0700
committerbors <bors@rust-lang.org>2013-08-23 05:16:21 -0700
commit4edf3758d178213882530c47b9ea1e2e6356d5a1 (patch)
treeed4fac8695064a6ad9b9ce96160b7e153f4875f0
parentf5018c5a4c908e5236c59b71df285e0569478c72 (diff)
parenta909144b1c5cc5ae5d32aaba63a4ee6bce5fc1e2 (diff)
downloadrust-4edf3758d178213882530c47b9ea1e2e6356d5a1.tar.gz
rust-4edf3758d178213882530c47b9ea1e2e6356d5a1.zip
auto merge of #8691 : anasazi/rust/fix-timer-interface, r=brson
Resolves #8687.
-rw-r--r--src/libstd/rt/io/timer.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/libstd/rt/io/timer.rs b/src/libstd/rt/io/timer.rs
index bfd1ed48ac1..b0ec747800d 100644
--- a/src/libstd/rt/io/timer.rs
+++ b/src/libstd/rt/io/timer.rs
@@ -18,9 +18,6 @@ use rt::local::Local;
 pub struct Timer(~RtioTimerObject);
 
 impl Timer {
-    fn new_on_rt(i: ~RtioTimerObject) -> Timer {
-        Timer(i)
-    }
 
     pub fn new() -> Option<Timer> {
         let timer = unsafe {
@@ -30,7 +27,7 @@ impl Timer {
             (*io).timer_init()
         };
         match timer {
-            Ok(t) => Some(Timer::new_on_rt(t)),
+            Ok(t) => Some(Timer(t)),
             Err(ioerr) => {
                 rtdebug!("Timer::init: failed to init: %?", ioerr);
                 io_error::cond.raise(ioerr);
@@ -38,10 +35,8 @@ impl Timer {
             }
         }
     }
-}
 
-impl RtioTimer for Timer {
-    fn sleep(&mut self, msecs: u64) {
+    pub fn sleep(&mut self, msecs: u64) {
         (**self).sleep(msecs);
     }
 }