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

Unified Diff: lib/coreimpl/stopwatch_implementation.dart

Issue 11227027: Revert 13878 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/coreimpl/splay_tree.dart ('k') | lib/coreimpl/string_buffer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/coreimpl/stopwatch_implementation.dart
===================================================================
--- lib/coreimpl/stopwatch_implementation.dart (revision 13885)
+++ lib/coreimpl/stopwatch_implementation.dart (working copy)
@@ -17,11 +17,11 @@
StopwatchImplementation() : _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
@@ -32,18 +32,18 @@
}
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;
@@ -51,10 +51,10 @@
}
int elapsed() {
- if (_start == null) {
+ if (_start === null) {
return 0;
}
- return (_stop == null) ? (_now() - _start) : (_stop - _start);
+ return (_stop === null) ? (_now() - _start) : (_stop - _start);
}
int elapsedInUs() {
« no previous file with comments | « lib/coreimpl/splay_tree.dart ('k') | lib/coreimpl/string_buffer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698