DescriptionMake `Stopwatch` logic simpler.
The `Stopwatch` class had more states than necessary because it started with
the `_start` and `_stop` fields being `null`, a state that couldn't happen later,
and it had to handle those cases specially.
Now just starts in a state equivalent to a stopped, reset timer.
Also use ?? and ??= because they are there,and don't call the overridable `isRunning` from other methods.
R=floitsch@google.com
Committed: https://github.com/dart-lang/sdk/commit/c3bb3ddb4184d8bd707a6752741c549c17f9c55e
Patch Set 1 #Patch Set 2 : Rearrange declarations. #
Total comments: 13
Messages
Total messages: 10 (4 generated)
|