Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions src/libstd/rt/io/timer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -30,18 +27,16 @@ 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);
None
}
}
}
}

impl RtioTimer for Timer {
fn sleep(&mut self, msecs: u64) {
pub fn sleep(&mut self, msecs: u64) {
(**self).sleep(msecs);
}
}
Expand Down