Class ActivityTimestamps
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clears both start and end time simultaneously.void
clearEnd()
Clears the end time.void
Clears the start time.getEnd()
Gets the time the user will be done.getStart()
Gets the time the user started playing.void
Sets the time the user will be done.void
Sets the time the user started playing.void
setStartAndEnd
(Instant start, Instant end) Sets both start and end time of the activity simultaneously.
-
Constructor Details
-
ActivityTimestamps
public ActivityTimestamps()
-
-
Method Details
-
setStart
Sets the time the user started playing.
If the end timestamp (
setEnd(java.time.Instant)
) is set as well, this cause a progress indicator to show up.Otherwise, this causes an "elapsed" duration to show up.
- Parameters:
start
- Start time
-
getStart
Gets the time the user started playing.- Returns:
- Start time
-
setEnd
Sets the time the user will be done.
If the start timestamp (
setStart(java.time.Instant)
) is set as well, this cause a progress indicator to show up.This causes a "remaining" duration to show up.
- Parameters:
end
- End time
-
getEnd
Gets the time the user will be done.- Returns:
- End time
-
setStartAndEnd
Sets both start and end time of the activity simultaneously.
This causes a progress indicator to show up.
This method exists purely for convenience and is equivalent to calling
setStart(java.time.Instant)
andsetEnd(java.time.Instant)
individually.- Parameters:
start
- Start timeend
- End time
-
clearStart
public void clearStart()Clears the start time. -
clearEnd
public void clearEnd()Clears the end time. -
clear
public void clear()Clears both start and end time simultaneously.
This method exists purely for convenience and is equivalent to calling
clearStart()
andclearEnd()
individually.
-