summaryrefslogtreecommitdiffstats
path: root/vespajlib
diff options
context:
space:
mode:
authorHarald Musum <musum@oath.com>2018-10-31 21:05:12 +0100
committerGitHub <noreply@github.com>2018-10-31 21:05:12 +0100
commit875c0cb04d0f0450bfb68d8e548fcaea6022bd49 (patch)
tree9c3b311dcbc9f7569ffc56939273f3f26831b311 /vespajlib
parent3db4288215479f38f7db9c1ddeeceb69a8ff93e5 (diff)
Revert "Enforce CC timeouts in Orchestrator [4]"
Diffstat (limited to 'vespajlib')
-rw-r--r--vespajlib/src/main/java/com/yahoo/time/TimeBudget.java12
1 files changed, 0 insertions, 12 deletions
diff --git a/vespajlib/src/main/java/com/yahoo/time/TimeBudget.java b/vespajlib/src/main/java/com/yahoo/time/TimeBudget.java
index 449b0d6bd05..a7963df0208 100644
--- a/vespajlib/src/main/java/com/yahoo/time/TimeBudget.java
+++ b/vespajlib/src/main/java/com/yahoo/time/TimeBudget.java
@@ -66,18 +66,6 @@ public class TimeBudget {
});
}
- /** Returns the time left, possibly negative if the deadline has passed. */
- public Optional<Duration> timeLeft() {
- return timeout.map(timeout -> timeout.minus(timePassed()));
- }
-
- /** Returns the time left as a new TimeBudget. */
- public TimeBudget timeLeftAsTimeBudget() {
- Instant now = clock.instant();
- Optional<Instant> deadline = deadline();
- return new TimeBudget(clock, now, deadline.map(d -> Duration.between(now, d)));
- }
-
private static Duration nonNegativeBetween(Instant start, Instant end) {
return makeNonNegative(Duration.between(start, end));
}