public interface StopWatch
reset()
) and a call to
lap()
. They should allow for multiple calls to lap()
but may preserve a class invariant that lap()
should not be called before reset()
(which would indicate a negative difference).
Stop watch implementations may start on construction or may provide an optional method to start. Check the
implementations.Modifier and Type | Method and Description |
---|---|
Duration |
elapsedTime() |
void |
lap()
mark a lap, this method can be invoked multiple times but should be called before making a call to the
elapsedTime() method. |
void |
reset()
start or reset the stop watch starting position.
|
void reset()
lap()
.void lap()
elapsedTime()
method.Duration elapsedTime()
Copyright © 2009–2017 tempus-fugit committers. All rights reserved.