Chromium Code Reviews| Index: samples/isolate_html/isolate_sample.dart |
| diff --git a/samples/isolate_html/isolate_sample.dart b/samples/isolate_html/isolate_sample.dart |
| index f3a9079ecf11a2dc44f7a8baa21bd35d42d19f8a..cac96286a829425607c6c223d90d7f66d6d9464f 100644 |
| --- a/samples/isolate_html/isolate_sample.dart |
| +++ b/samples/isolate_html/isolate_sample.dart |
| @@ -75,11 +75,9 @@ void isolateMain() { |
| if (div.query('input.replyCheckbox').checked) { |
| InputElement element = div.query('.delayTextbox'); |
| int millis = int.parse(element.value); |
| - // TODO(justinfagnani): use Timer when it works in isolates in dart2js |
| - // see: http://dartbug.com/4997 |
| - window.setTimeout(() { |
| + new Timer(new Duration(millis), () { |
|
floitsch
2013/02/13 10:03:07
new Duration(milliseconds: millis)
|
| replyTo.send('this is a reply from isolate "${isolateName}"', null); |
| - }, millis); |
| + }); |
| } |
| } |