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

Unified Diff: corelib/src/stopwatch.dart

Issue 8537011: Rename StopWatch to Stopwatch. Add new Stopwatch.start() and Stopwatch.reset(). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: '' Created 9 years, 1 month 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 | « corelib/src/implementation/stopwatch_implementation.dart ('k') | frog/leg/compiler.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: corelib/src/stopwatch.dart
===================================================================
--- corelib/src/stopwatch.dart (revision 1504)
+++ corelib/src/stopwatch.dart (working copy)
@@ -3,34 +3,47 @@
// BSD-style license that can be found in the LICENSE file.
/**
- * A simple [StopWatch] interface to measure elapsed time.
+ * A simple [Stopwatch] interface to measure elapsed time.
*/
-interface StopWatch factory StopWatchImplementation {
+interface Stopwatch factory StopwatchImplementation {
/**
- * Creates a [StopWatch] in stopped state with a zero elapsed count.
+ * Creates a [Stopwatch] in stopped state with a zero elapsed count.
*/
- StopWatch();
+ Stopwatch();
/**
- * Starts the [StopWatch]. The [elapsed] count is increasing monotonically.
- * If the [StopWatch] has been stopped, then calling start again restarts it.
- * If the [StopWatch] is currently running, then calling start does nothing.
+ * Creates a [Stopwatch] in started state with a zero elapsed count.
*/
+ Stopwatch.start();
+
+ /**
+ * Starts the [Stopwatch]. The [elapsed] count is increasing monotonically.
+ * If the [Stopwatch] has been stopped, then calling start again restarts it
+ * without resetting the [elapsed] count.
+ * If the [Stopwatch] is currently running, then calling start does nothing.
+ */
void start();
/**
- * Stops the [StopWatch]. The [elapsed] count stops increasing.
- * If the [StopWatch] is currently not running, then calling stop does nothing.
+ * Stops the [Stopwatch]. The [elapsed] count stops increasing.
+ * If the [Stopwatch] is currently not running, then calling stop does
+ * nothing.
*/
void stop();
/**
+ * Resets the [elapsed] count to zero. This method does not stop or start
+ * the [Stopwatch].
+ */
+ void reset();
+
+ /**
* Returns the elapsed number of clock ticks since calling [start] while the
- * [StopWatch] is running.
+ * [Stopwatch] is running.
* Returns the elapsed number of clock ticks between calling [start] and
* calling [stop].
- * Returns 0 if the [StopWatch] has never been started.
+ * Returns 0 if the [Stopwatch] has never been started.
* The elapsed number of clock ticks increases by [frequency] every second.
*/
int elapsed();
« no previous file with comments | « corelib/src/implementation/stopwatch_implementation.dart ('k') | frog/leg/compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698