floodsim.model.logic.Timer
See theTimer companion object
A timer that tracks elapsed time in seconds and provides formatting capabilities. This is an immutable class - all operations return new Timer instances.
Value parameters
totalSeconds
the total number of seconds that have elapsed
Attributes
Companion
object
Graph
Reset zoom Hide graph Show graph
Supertypes
class Object
trait Matchable
class Any
Members list
Increments the timer by the specified number of seconds. Returns a new Timer instance with the updated time (immutable operation).
Increments the timer by the specified number of seconds. Returns a new Timer instance with the updated time (immutable operation).
Value parameters
amount
the number of seconds to add to the timer (must be non-negative)
Attributes
Returns
a new Timer instance with the updated elapsed time
Throws
IllegalArgumentException
if amount is negative
Resets the timer to zero elapsed time. Returns a new Timer instance with zero seconds elapsed.
Resets the timer to zero elapsed time. Returns a new Timer instance with zero seconds elapsed.
Attributes
Returns
a new Timer instance with zero elapsed seconds