package SomeUtils.Clock;import SomeUtils.Clock.Alarm;public final static int millis;
public final static int seconds;
public final static int nanos;These variables are for setting the unit of time.
public interface AlarmWatcher{
public void isRinging(boolean ringing);
}This interface is used to listen for the Alarm.
public void start();Used for starting the inner timer.
Not recommended to be called manually; it is automatically called.
public void alarmAfter(final long duration, final int unit, final AlarmWatcher watcher);
public void alarmAfter(final long duration, final int unit);The only thing an alarm clock should do.
import SomeUtils.Clock.Stopwatch;public final static int millis;
public final static int seconds;
public final static int nanos;These variables are for setting the unit of time.
public void start();Starts the stopwatch.
public long getTimeElapsed();
public long getTimeElapsed(final int unit);Gets the time elapsed after the stopwatch was started.
public void lap();
public void split();This records the current lap; splits.
public long[][] getLaps();Takes the lap/split method from the object.
import SomeUtils.Clock.Timer;public final static int millis;
public final static int seconds;
public final static int nanos;These variables are for setting the unit of time.
public interface TimerWatcher{
public void hasStopped(boolean stopped);
public void timeElapsed(long nano, long millis, long seconds);
public void timeLeft(long timeLeft);
}Used to watch while the timer is running.
public void stopAfter(final long duration, final int unit);Used to pause the thread for a duration.
public void setWatcher(final TimerWatcher watcher);Used to latch a watcher before calling the method above.