public class Metronome
extends java.lang.Object
This class follows DbC(tm) methodology
(Wikipedia).
Where possible, contracts are implement with native's Java
assert.
Constructor and Description |
---|
Metronome(long clockPeriod)
Constructs a new metronome with a specified time period.
|
public Metronome(long clockPeriod)
clockPeriod > 0L
clockPeriod
- the metronome's period in millisecondspublic boolean active()
public long sync()
public void terminate()
!active()