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
Signed-off-by: Eamonn Mansour <47121388+eamansour@users.noreply.github.com>
  • Loading branch information
eamansour committed Sep 6, 2024
1 parent 1631d5a commit 74674bd
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.
this.currentTime = this.currentTime.plusMillis(millisToSleep);
}
}

0 comments on commit 74674bd

Please sign in to comment.