Package edu.fiu.jtlex.processors
Class Watch
java.lang.Object
edu.fiu.jtlex.processors.Watch
A class for recording time intervals in seconds.
- Since:
- Revision 800
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublelap()Calculates difference in seconds between the initial timestamp and the invocation of this method.voidstart()Starts the watch by recording the initial timestamp.doublestop()Calculates difference in seconds between the initial timestamp and the invocation of this method and deletes the initial timestamp.
-
Constructor Details
-
Watch
public Watch()Creates a watch.- Since:
- Revision 800
-
-
Method Details
-
start
public void start()Starts the watch by recording the initial timestamp.- Since:
- Revision 800
-
stop
public double stop()Calculates difference in seconds between the initial timestamp and the invocation of this method and deletes the initial timestamp.- Returns:
- The difference in seconds between the initial timestamp and the invocation of this method, or zero if there is no initial timestamp.
- Since:
- Revision 800
- See Also:
-
lap
public double lap()Calculates difference in seconds between the initial timestamp and the invocation of this method.- Returns:
- The difference in seconds between the initial timestamp and the invocation of this method, or zero if there is no initial timestamp.
- Since:
- Revision 800
- See Also:
-