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

Unified Diff: sdk/lib/core/stopwatch.dart

Issue 11361190: a === b -> identical(a, b) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/core/set.dart ('k') | sdk/lib/core/string_buffer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/core/stopwatch.dart
diff --git a/sdk/lib/core/stopwatch.dart b/sdk/lib/core/stopwatch.dart
index 79e08c9a68a6e408b1ff8c7f4c39069a6141f771..14aa551d6256489313de9bffe7d56a6375ce2795 100644
--- a/sdk/lib/core/stopwatch.dart
+++ b/sdk/lib/core/stopwatch.dart
@@ -75,11 +75,11 @@ class _StopwatchImpl implements Stopwatch {
_StopwatchImpl() : _start = null, _stop = null {}
void start() {
- if (_start === null) {
+ if (_start == null) {
// This stopwatch has never been started.
_start = _now();
} else {
- if (_stop === null) {
+ if (_stop == null) {
return;
}
// Restarting this stopwatch. Prepend the elapsed time to the current
@@ -90,18 +90,18 @@ class _StopwatchImpl implements Stopwatch {
}
void stop() {
- if (_start === null || _stop !== null) {
+ if (_start == null || _stop != null) {
return;
}
_stop = _now();
}
void reset() {
- if (_start === null) return;
+ if (_start == null) return;
// If [_start] is not null, then the stopwatch had already been started. It
// may running right now.
_start = _now();
- if (_stop !== null) {
+ if (_stop != null) {
// The watch is not running. So simply set the [_stop] to [_start] thus
// having an elapsed time of 0.
_stop = _start;
@@ -109,10 +109,10 @@ class _StopwatchImpl implements Stopwatch {
}
int get elapsedTicks {
- if (_start === null) {
+ if (_start == null) {
return 0;
}
- return (_stop === null) ? (_now() - _start) : (_stop - _start);
+ return (_stop == null) ? (_now() - _start) : (_stop - _start);
}
int get elapsedMicroseconds {
« no previous file with comments | « sdk/lib/core/set.dart ('k') | sdk/lib/core/string_buffer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698