// Implements http://rosettacode.org/wiki/Concurrent_computing
// not_tested
use std::io::timer::sleep;
use std::rand::random;
use std::time::duration::Duration;

fn main() {
    let strings = vec!["Enjoy", "Rosetta", "Code"];

    for s in strings.move_iter(){
        spawn(proc() {
            // We use a random u8 (so an integer from 0 to 255)
            sleep(Duration::milliseconds(random::<u8>() as i32));
            println!("{}", s);
        });
    }
}

// Implements http://rosettacode.org/wiki/Concurrent_computing
// not_tested
use std::io::timer::sleep;
use std::rand::random;

fn main() {
    let strings = vec!["Enjoy", "Rosetta", "Code"];

    for s in strings.move_iter(){
        spawn(proc() {
            // We use a random u8 (so an integer from 0 to 255)
            sleep(random::<u8>() as u64);
            println!("{}", s);
        });
    }
}

--- 
+++ 
@@ -2,7 +2,6 @@
 // not_tested
 use std::io::timer::sleep;
 use std::rand::random;
-use std::time::duration::Duration;
 
 fn main() {
     let strings = vec!["Enjoy", "Rosetta", "Code"];
@@ -10,7 +9,7 @@
     for s in strings.move_iter(){
         spawn(proc() {
             // We use a random u8 (so an integer from 0 to 255)
-            sleep(Duration::milliseconds(random::<u8>() as i32));
+            sleep(random::<u8>() as u64);
             println!("{}", s);
         });
     }
Fix use of sleep function after api change
