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

Side by Side Diff: dart/site/try/poi/repeat_poi.dart

Issue 621233003: Count number of iterations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r40933 Created 6 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 import 'poi.dart' as poi; 5 import 'poi.dart' as poi;
6 6
7 int count = 0;
8
9 int MAX_ITERATIONS =
10 const int.fromEnvironment('MAX_ITERATIONS', defaultValue: null);
11
7 main(arguments) { 12 main(arguments) {
13 count++;
14 if (MAX_ITERATIONS != null && count > MAX_ITERATIONS) return;
15 print('\n\n\n\nIteration #$count.');
8 poi.main(arguments).then((_) => main(arguments)); 16 poi.main(arguments).then((_) => main(arguments));
9 } 17 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698