Timer

Extends
InfoBox
Methods
8
Fields
None

Getting one

Timer.new(…)

Methods

MethodReturnsDescription
getStartTime()InstantWhen it was made.
getEndTime()InstantWhen it runs out.
getDuration()DurationFrom start to end.
setDuration(Duration)()Run out duration after the start; raises IllegalArgumentException for a negative one.
updateDuration(Duration)()Run out duration from now; raises IllegalArgumentException for a negative one.
toString()stringThe text form: Timer(startTime=..., endTime=..., duration=...).
isInstance(any)booleanWhether obj is an instance of this class or a subclass of it, as made with class.
new(number, ChronoUnit, BufferedImage?, any?)TimerA timer of period units from now; raises IllegalArgumentException for a period of 0 or less.

Returned by

MethodReturnsDescription
TimerClass.newTimerA timer of period units from now; raises IllegalArgumentException for a period of 0 or less.

Method details

setDuration

setDuration: (Timer, Duration) -> ()

Run out duration after the start; raises IllegalArgumentException for a negative one.

toString

toString: (Timer) -> string

The text form: Timer(startTime=..., endTime=..., duration=...).

isInstance

isInstance: (any) -> boolean

Whether obj is an instance of this class or a subclass of it, as made with class.