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

Unified Diff: lib/coreimpl/stopwatch_implementation.dart

Issue 11265024: Make methods in Stopwatch getters and rename to be more consistent. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status files with co19 issue number. 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/core/stopwatch.dart ('k') | tests/benchmark_smoke/benchmark_base.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/coreimpl/stopwatch_implementation.dart
diff --git a/lib/coreimpl/stopwatch_implementation.dart b/lib/coreimpl/stopwatch_implementation.dart
index f22f21052727a253eaefbc15a34a15811f7fa5ef..30b4ca262d9f094a9b6ecaf2d5c196a332b62780 100644
--- a/lib/coreimpl/stopwatch_implementation.dart
+++ b/lib/coreimpl/stopwatch_implementation.dart
@@ -50,22 +50,22 @@ class StopwatchImplementation implements Stopwatch {
}
}
- int elapsed() {
+ int get elapsedTicks {
if (_start === null) {
return 0;
}
return (_stop === null) ? (_now() - _start) : (_stop - _start);
}
- int elapsedInUs() {
- return (elapsed() * 1000000) ~/ frequency();
+ int get elapsedMicroseconds {
+ return (elapsedTicks * 1000000) ~/ frequency;
}
- int elapsedInMs() {
- return (elapsed() * 1000) ~/ frequency();
+ int get elapsedMilliseconds {
+ return (elapsedTicks * 1000) ~/ frequency;
}
- int frequency() => _frequency();
+ int get frequency => _frequency();
external static int _frequency();
external static int _now();
« no previous file with comments | « lib/core/stopwatch.dart ('k') | tests/benchmark_smoke/benchmark_base.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698