Utils
Class TimePassed

java.lang.Object
  extended by Utils.TimePassed

public class TimePassed
extends java.lang.Object

A class to check wether a set amount of time has passed.

Version:
1.0

Constructor Summary
TimePassed(int num, java.util.concurrent.TimeUnit unit)
          Defcault constructor.
 
Method Summary
 boolean hasPassed()
          Check to see if the required amount of time has passed.
 void reset()
          Reset the timer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimePassed

public TimePassed(int num,
                  java.util.concurrent.TimeUnit unit)
Defcault constructor. Sets how much time should pass.

Parameters:
num - The number of time units that should pass between checkpoint writes.
unit - The time unit
Method Detail

hasPassed

public boolean hasPassed()
Check to see if the required amount of time has passed. If it has reset the timer and return true.

Returns:
Whether the required amount of time has passed.

reset

public void reset()
Reset the timer.