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

Issue 9416065: Stopwatch.elapsed must always increase after start has been called. (Closed)

Created:
8 years, 10 months ago by ahe
Modified:
8 years, 10 months ago
CC:
reviews_dartlang.org, Ivan Posva, jjb, srdjan
Visibility:
Public.

Description

Stopwatch.elapsed must always increase after start has been called. Committed: https://code.google.com/p/dart/source/detail?r=4479

Patch Set 1 #

Total comments: 2

Patch Set 2 : Address comments and rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+126 lines, -15 lines) Patch
M dart/corelib/src/implementation/stopwatch_implementation.dart View 1 2 chunks +4 lines, -2 lines 0 comments Download
M dart/frog/minfrog View 1 21 chunks +122 lines, -3 lines 0 comments Download
M dart/tests/co19/co19-leg.status View 1 1 chunk +0 lines, -6 lines 0 comments Download
M dart/tests/co19/co19-runtime.status View 1 1 chunk +0 lines, -4 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
ahe
8 years, 10 months ago (2012-02-21 18:10:19 UTC) #1
floitsch
LGTM!! thanks for fixing that one. https://chromiumcodereview.appspot.com/9416065/diff/1/dart/corelib/src/implementation/stopwatch_implementation.dart File dart/corelib/src/implementation/stopwatch_implementation.dart (right): https://chromiumcodereview.appspot.com/9416065/diff/1/dart/corelib/src/implementation/stopwatch_implementation.dart#newcode38 dart/corelib/src/implementation/stopwatch_implementation.dart:38: if (_start === ...
8 years, 10 months ago (2012-02-22 09:57:01 UTC) #2
Ivan Posva
LGTM with Florian's suggestion addressed. -Ivan
8 years, 10 months ago (2012-02-22 17:29:21 UTC) #3
ahe
8 years, 10 months ago (2012-02-22 17:59:14 UTC) #4
Hi Florian and Ivan,

Thank you for taking a look.

Cheers,
Peter

https://chromiumcodereview.appspot.com/9416065/diff/1/dart/corelib/src/implem...
File dart/corelib/src/implementation/stopwatch_implementation.dart (right):

https://chromiumcodereview.appspot.com/9416065/diff/1/dart/corelib/src/implem...
dart/corelib/src/implementation/stopwatch_implementation.dart:38: if (_start ===
null) {
On 2012/02/22 09:57:01, floitsch wrote:
> || _stop !== null
> 
> This is a bug I noticed recently: when calling stop multiple times the elapsed
> time was updated each time. I unsuccessfully tried to figure out how to fix it
> (without adding a boolean field) and with your change it becomes trivial.

Done.

Powered by Google App Engine
This is Rietveld 408576698