We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 063a005 commit a909144Copy full SHA for a909144
src/libstd/rt/io/timer.rs
@@ -18,9 +18,6 @@ use rt::local::Local;
18
pub struct Timer(~RtioTimerObject);
19
20
impl Timer {
21
- fn new_on_rt(i: ~RtioTimerObject) -> Timer {
22
- Timer(i)
23
- }
24
25
pub fn new() -> Option<Timer> {
26
let timer = unsafe {
@@ -30,18 +27,16 @@ impl Timer {
30
27
(*io).timer_init()
31
28
};
32
29
match timer {
33
- Ok(t) => Some(Timer::new_on_rt(t)),
+ Ok(t) => Some(Timer(t)),
34
Err(ioerr) => {
35
rtdebug!("Timer::init: failed to init: %?", ioerr);
36
io_error::cond.raise(ioerr);
37
None
38
}
39
40
41
-}
42
43
-impl RtioTimer for Timer {
44
- fn sleep(&mut self, msecs: u64) {
+ pub fn sleep(&mut self, msecs: u64) {
45
(**self).sleep(msecs);
46
47
0 commit comments