From 3ddb73c1d6ea0f3a569fb91903848b9a200adcc4 Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Fri, 30 Jun 2023 18:04:58 +0200 Subject: [PATCH] Simplify ReferenceTime.now() --- .../kotlin/org/pgpainless/wot/dijkstra/sq/ReferenceTime.kt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/wot-dijkstra/src/main/kotlin/org/pgpainless/wot/dijkstra/sq/ReferenceTime.kt b/wot-dijkstra/src/main/kotlin/org/pgpainless/wot/dijkstra/sq/ReferenceTime.kt index 1cea10ff..178420dc 100644 --- a/wot-dijkstra/src/main/kotlin/org/pgpainless/wot/dijkstra/sq/ReferenceTime.kt +++ b/wot-dijkstra/src/main/kotlin/org/pgpainless/wot/dijkstra/sq/ReferenceTime.kt @@ -23,11 +23,7 @@ interface ReferenceTime { */ @JvmStatic fun now(): ReferenceTime { - val now = Date() - return object: ReferenceTime { - override val timestamp: Date - get() = now - } + return timestamp(Date()) } /**