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

Side by Side Diff: utils/pub/sdk.dart

Issue 13704003: Reapply "Add a sleep function to dart:io" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added "hide sleep" where needed Created 7 years, 8 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 /// Operations relative to the user's installed Dart SDK. 5 /// Operations relative to the user's installed Dart SDK.
6 library sdk; 6 library sdk;
7 7
8 import 'dart:io'; 8 import 'dart:io';
9 9
10 import 'package:pathos/path.dart' as path; 10 import 'package:pathos/path.dart' as path;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 throw new FormatException("The Dart SDK's 'version' file was not in a " 49 throw new FormatException("The Dart SDK's 'version' file was not in a "
50 "format pub could recognize. Found: $version"); 50 "format pub could recognize. Found: $version");
51 } 51 }
52 52
53 // Semantic versions cannot use "_". 53 // Semantic versions cannot use "_".
54 var build = match[4].replaceAll('_', '.'); 54 var build = match[4].replaceAll('_', '.');
55 55
56 return new Version( 56 return new Version(
57 int.parse(match[1]), int.parse(match[2]), int.parse(match[3]), 57 int.parse(match[1]), int.parse(match[2]), int.parse(match[3]),
58 build: build); 58 build: build);
59 } 59 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698