| Index: samples/actors/core/actors-term.dart
|
| diff --git a/samples/actors/core/actors-term.dart b/samples/actors/core/actors-term.dart
|
| index e082de85f3eb7160afd3ceff78d9f631a65b56f8..f07ef4e6d0570948fc76f455d44b98cced390d5d 100644
|
| --- a/samples/actors/core/actors-term.dart
|
| +++ b/samples/actors/core/actors-term.dart
|
| @@ -8,6 +8,14 @@ class _WindowActor extends Actor {
|
| on["print"] = (String m) {
|
| print("${m}");
|
| };
|
| +
|
| + /**
|
| + * Sends a message back using the 'reply' parameter after specified number
|
| + * of milliseconds specified by 'timeout' parameter.
|
| + */
|
| + on["setTimeout"] = (Reply reply, int timeout) {
|
| + new Timer((Timer t) {reply.respond();}, timeout, false);
|
| + };
|
| }
|
| }
|
|
|
| @@ -16,4 +24,7 @@ class _WindowProxyImpl extends _NullWindowProxy {
|
| _WindowProxyImpl(this._window);
|
|
|
| void print(String m) => _window.send("print", [m]);
|
| +
|
| + void setTimeout(Reply t, int timeout) =>
|
| + _window.send("setTimeout", [t, timeout]);
|
| }
|
|
|