Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
Implement sleepMillis in MockTimeService to fix main build failures (#…
Browse files Browse the repository at this point in the history
…270)

Signed-off-by: Eamonn Mansour <[email protected]>
  • Loading branch information
eamansour authored Sep 6, 2024
1 parent 1631d5a commit dd63250
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,10 @@ public Instant now() {
public void setCurrentTime(Instant currentTime) {
this.currentTime = currentTime;
}

@Override
public void sleepMillis(long millisToSleep) throws InterruptedException {
// Pretend we are sleeping, so the current time advances.
setCurrentTime(currentTime.plusMillis(millisToSleep));
}
}

0 comments on commit dd63250

Please sign in to comment.