private Duration timeLeft() {
        return Duration.ofNanos(endTime - System.nanoTime());
    }
Handles timeout of a task.
@author Tony Vaagenes
fileacquirer/src/main/java/com/yahoo/filedistribution/fileacquirer/Timer.java