Package edu.fiu.jtlex.data
Class Watch
java.lang.Object
edu.fiu.jtlex.data.Watch
A class for recording time intervals in seconds.
- Since:
- jTLEX 1.0
-
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:
- jTLEX 1.0
-
-
Method Details
-
start
public void start()Starts the watch by recording the initial timestamp.- Since:
- jTLEX 1.0
-
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:
- jTLEX 1.0
- 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:
- jTLEX 1.0
- See Also:
-