Skip to content

Commit

Permalink
Scalafmt
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanAtDealEngine committed Sep 5, 2023
1 parent 6f41af9 commit 4848db1
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,13 @@ object Util {
// From cats
private val scheduler: Scheduler = new Scheduler {
override def sleep(delay: FiniteDuration, task: Runnable): Runnable =
() => Future.Unit.flatMap { _ =>
implicit val timer: JavaTimer = new JavaTimer()
Future.sleep(Duration.fromMilliseconds(delay.toMillis)).flatMap { _ =>
Future { task.run() }
() =>
Future.Unit.flatMap { _ =>
implicit val timer: JavaTimer = new JavaTimer()
Future.sleep(Duration.fromMilliseconds(delay.toMillis)).flatMap { _ =>
Future { task.run() }
}
}
}

override def nowMillis(): Long = System.currentTimeMillis()

Expand Down

0 comments on commit 4848db1

Please sign in to comment.