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

Side by Side Diff: samples/third_party/dromaeo/common/Interval.dart

Issue 10919146: Get rid of a lot of () for getters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 // A utility object for measuring time intervals. 5 // A utility object for measuring time intervals.
6 6
7 class Interval { 7 class Interval {
8 int _start, _stop; 8 int _start, _stop;
9 9
10 Interval() { 10 Interval() {
11 } 11 }
12 12
13 void start() { 13 void start() {
14 _start = BenchUtil.now; 14 _start = BenchUtil.now;
15 } 15 }
16 16
17 void stop() { 17 void stop() {
18 _stop = BenchUtil.now; 18 _stop = BenchUtil.now;
19 } 19 }
20 20
21 // Microseconds from between start() and stop(). 21 // Microseconds from between start() and stop().
22 int get elapsedMicrosec() { 22 int get elapsedMicrosec {
23 return (_stop - _start) * 1000; 23 return (_stop - _start) * 1000;
24 } 24 }
25 25
26 // Milliseconds from between start() and stop(). 26 // Milliseconds from between start() and stop().
27 int get elapsedMillisec() { 27 int get elapsedMillisec {
28 return (_stop - _start); 28 return (_stop - _start);
29 } 29 }
30 } 30 }
OLDNEW
« no previous file with comments | « samples/third_party/dromaeo/common/BenchUtil.dart ('k') | samples/third_party/todomvc/scripts/components.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698