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

Side by Side Diff: test/generated_sdk/lib/async/timer.dart

Issue 959913003: cleanup patch generation to preseve comments and remove @patch (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 10 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
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 part of dart.async; 5 part of dart.async;
6 6
7 /** 7 /**
8 * A count-down timer that can be configured to fire once or repeatedly. 8 * A count-down timer that can be configured to fire once or repeatedly.
9 * 9 *
10 * The timer counts down from the specified duration to 0. 10 * The timer counts down from the specified duration to 0.
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 /** 97 /**
98 * Returns whether the timer is still active. 98 * Returns whether the timer is still active.
99 * 99 *
100 * A non-periodic timer is active if the callback has not been executed, 100 * A non-periodic timer is active if the callback has not been executed,
101 * and the timer has not been canceled. 101 * and the timer has not been canceled.
102 * 102 *
103 * A periodic timer is active if it has not been canceled. 103 * A periodic timer is active if it has not been canceled.
104 */ 104 */
105 bool get isActive; 105 bool get isActive;
106 106
107 @patch
108 static Timer _createTimer(Duration duration, void callback()) { 107 static Timer _createTimer(Duration duration, void callback()) {
109 int milliseconds = duration.inMilliseconds; 108 int milliseconds = duration.inMilliseconds;
110 if (milliseconds < 0) milliseconds = 0; 109 if (milliseconds < 0) milliseconds = 0;
111 return new TimerImpl(milliseconds, callback); 110 return new TimerImpl(milliseconds, callback);
112 } 111 }
113 @patch
114 static Timer _createPeriodicTimer(Duration duration, 112 static Timer _createPeriodicTimer(Duration duration,
115 void callback(Timer timer)) { 113 void callback(Timer timer)) {
116 int milliseconds = duration.inMilliseconds; 114 int milliseconds = duration.inMilliseconds;
117 if (milliseconds < 0) milliseconds = 0; 115 if (milliseconds < 0) milliseconds = 0;
118 return new TimerImpl.periodic(milliseconds, callback); 116 return new TimerImpl.periodic(milliseconds, callback);
119 } 117 }
120 } 118 }
121 119
OLDNEW
« no previous file with comments | « test/generated_sdk/lib/async/schedule_microtask.dart ('k') | test/generated_sdk/lib/collection/hash_map.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698