class TimeoutBudget {

    public Duration timeLeft() {
        Instant now = clock.instant();
        Duration duration = Duration.between(now, endTime);
        return duration.isNegative() ? Duration.ZERO : duration;
    }

    public  TimeoutBudget(Clock clock, Duration duration);

}