Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Side by Side Diff: sdk/lib/_internal/compiler/implementation/lib/async_patch.dart

Issue 11866003: Support Timer with 0 millisecond delay in dart2js running in the command line. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart 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 file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // Patch file for the dart:async library. 5 // Patch file for the dart:async library.
6 6
7 patch class Timer { 7 patch class Timer {
8 patch factory Timer(int milliseconds, void callback(Timer timer)) { 8 patch factory Timer(int milliseconds, void callback(Timer timer)) {
9 if (!hasTimer()) {
10 throw new UnsupportedError("Timer interface not supported.");
11 }
12 return new TimerImpl(milliseconds, callback); 9 return new TimerImpl(milliseconds, callback);
13 } 10 }
14 11
15 /** 12 /**
16 * Creates a new repeating timer. The [callback] is invoked every 13 * Creates a new repeating timer. The [callback] is invoked every
17 * [milliseconds] millisecond until cancelled. 14 * [milliseconds] millisecond until cancelled.
18 */ 15 */
19 patch factory Timer.repeating(int milliseconds, void callback(Timer timer)) { 16 patch factory Timer.repeating(int milliseconds, void callback(Timer timer)) {
20 if (!hasTimer()) {
21 throw new UnsupportedError("Timer interface not supported.");
22 }
23 return new TimerImpl.repeating(milliseconds, callback); 17 return new TimerImpl.repeating(milliseconds, callback);
24 } 18 }
25 } 19 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698