| OLD | NEW |
| 1 // Copyright (c) 2014, the Fletch project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dartino project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
| 4 | 4 |
| 5 import 'dart:async'; | 5 import 'dart:async'; |
| 6 import 'dart:fletch'; | 6 import 'dart:fletch'; |
| 7 | 7 |
| 8 main() { | 8 main() { |
| 9 var input = new Channel(); | 9 var input = new Channel(); |
| 10 var port = new Port(input); | 10 var port = new Port(input); |
| 11 Process.spawn(sleepAndThenSend, port); | 11 Process.spawn(sleepAndThenSend, port); |
| 12 } | 12 } |
| 13 | 13 |
| 14 void sleepAndThenSend(Port port) { | 14 void sleepAndThenSend(Port port) { |
| 15 new Timer(const Duration(milliseconds: 100), () { | 15 new Timer(const Duration(milliseconds: 100), () { |
| 16 port.send(42); | 16 port.send(42); |
| 17 }); | 17 }); |
| 18 } | 18 } |
| OLD | NEW |