Sync
This commit is contained in:
parent
6f050a029e
commit
776bba907c
3887 changed files with 59894 additions and 7280 deletions
|
|
@ -1,13 +1,15 @@
|
|||
extern mod std;
|
||||
use std::timer::sleep;
|
||||
use std::uv::global_loop;
|
||||
// rust 0.8
|
||||
|
||||
fn main() {
|
||||
for os::args().tail().each |&arg| {
|
||||
do task::spawn {
|
||||
let n = uint::from_str(arg).get();
|
||||
sleep(global_loop::get(), n);
|
||||
io::println(arg);
|
||||
fn main()
|
||||
{
|
||||
let args = std::os::args();
|
||||
for arg in args.tail().iter()
|
||||
{
|
||||
let n = from_str::<u64>(*arg).unwrap();
|
||||
do std::task::spawn
|
||||
{
|
||||
std::rt::io::timer::sleep(n);
|
||||
println!("{}", n);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue