OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 // Misc benchmark-related utility functions. | 5 // Misc benchmark-related utility functions. |
6 | 6 |
7 class BenchUtil { | 7 class BenchUtil { |
8 static int get now() { | 8 static int get now() { |
9 return new Date.now().value; | 9 return new Date.now().value; |
10 } | 10 } |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 for (Match match in new RegExp(pattern).allMatches(s)) { | 73 for (Match match in new RegExp(pattern).allMatches(s)) { |
74 sb.add(s.substring(pos, match.start())); | 74 sb.add(s.substring(pos, match.start())); |
75 sb.add(replacement(match)); | 75 sb.add(replacement(match)); |
76 pos = match.end(); | 76 pos = match.end(); |
77 } | 77 } |
78 sb.add(s.substring(pos)); | 78 sb.add(s.substring(pos)); |
79 | 79 |
80 return sb.toString(); | 80 return sb.toString(); |
81 } | 81 } |
82 } | 82 } |
OLD | NEW |