diff --git a/build.sbt b/build.sbt index 9f52114a8..1b300700a 100644 --- a/build.sbt +++ b/build.sbt @@ -10,7 +10,7 @@ inThisBuild( ) ) -val scalalibVersion = "11.2.9" +val scalalibVersion = "11.3.0" val commonSettings = Seq( scalacOptions := Seq( diff --git a/core/src/main/scala/Timestamp.scala b/core/src/main/scala/Timestamp.scala index 89fbfb8a1..c7d006455 100644 --- a/core/src/main/scala/Timestamp.scala +++ b/core/src/main/scala/Timestamp.scala @@ -3,12 +3,12 @@ package chess opaque type Timestamp = Long object Timestamp extends OpaqueLong[Timestamp]: extension (t: Timestamp) - def -(o: Timestamp): Centis = Centis.ofMillis(t - o.value) - def +(o: Centis): Timestamp = Timestamp(t + o.millis) + def --(o: Timestamp): Centis = Centis.ofMillis(t - o.value) + def +(o: Centis): Timestamp = Timestamp(t + o.millis) trait Timestamper: def now: Timestamp - def toNow(ts: Timestamp) = now - ts + def toNow(ts: Timestamp) = now -- ts private[chess] object RealTimestamper extends Timestamper: def now = Timestamp(System.currentTimeMillis)