File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
branches/auto/src/libstd/rt/io Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,6 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
14
14
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
15
15
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
16
16
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17
- refs/heads/auto: 5da29e3278b639540679e88fc7dd008435066e9a
17
+ refs/heads/auto: 155470fc9cd8e1cdfd0f6ecc558f865f54c1ef29
18
18
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
19
19
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
Original file line number Diff line number Diff line change @@ -298,7 +298,7 @@ mod extensions;
298
298
mod support;
299
299
300
300
/// Basic Timer
301
- mod timer;
301
+ pub mod timer;
302
302
303
303
/// Thread-blocking implementations
304
304
pub mod native {
Original file line number Diff line number Diff line change @@ -17,19 +17,19 @@ use rt::local::Local;
17
17
pub struct Timer ( ~RtioTimerObject ) ;
18
18
19
19
impl Timer {
20
- fn new ( i : ~RtioTimerObject ) -> Timer {
20
+ fn new_on_rt ( i : ~RtioTimerObject ) -> Timer {
21
21
Timer ( i)
22
22
}
23
23
24
- pub fn init ( ) -> Option < Timer > {
24
+ pub fn new ( ) -> Option < Timer > {
25
25
let timer = unsafe {
26
26
rtdebug ! ( "Timer::init: borrowing io to init timer" ) ;
27
27
let io = Local :: unsafe_borrow :: < IoFactoryObject > ( ) ;
28
28
rtdebug ! ( "about to init timer" ) ;
29
29
( * io) . timer_init ( )
30
30
} ;
31
31
match timer {
32
- Ok ( t) => Some ( Timer :: new ( t) ) ,
32
+ Ok ( t) => Some ( Timer :: new_on_rt ( t) ) ,
33
33
Err ( ioerr) => {
34
34
rtdebug ! ( "Timer::init: failed to init: %?" , ioerr) ;
35
35
io_error:: cond. raise ( ioerr) ;
@@ -53,7 +53,7 @@ mod test {
53
53
#[ test]
54
54
fn test_io_timer_sleep_simple ( ) {
55
55
do run_in_newsched_task {
56
- let timer = Timer :: init ( ) ;
56
+ let timer = Timer :: new ( ) ;
57
57
match timer {
58
58
Some ( t) => t. sleep ( 1 ) ,
59
59
None => assert ! ( false )
You can’t perform that action at this time.
0 commit comments