@Override
  public void start () {
    if(delay <= -1) { throw new IllegalStateException("Delay not set"); }
    if(r == null) { throw new IllegalStateException("Runnable was not set"); }
    if(canceled) { throw new IllegalStateException("Timer was canceled"); }
    if(hasStarted) { throw new IllegalStateException("Timer was already started"); }
    
    if(!started) {
        synchronized(lock) {
            if(oldTask != null) {
                oldTask.cancel();
            }
            oldTask = new Task();
            if(delay <= 0) { throw new IllegalStateException("Delay is 0"); }
            t.scheduleAtFixedRate(oldTask, delay, delay);
        }
    }
    synchronized(lock) {
        started = true;
        running = true;
        hasStarted = true;
    }
}