diff --git a/library/src/commonMain/kotlin/com/tidal/networktime/internal/NtpExchanger.kt b/library/src/commonMain/kotlin/com/tidal/networktime/internal/NtpExchanger.kt index 97cef84b..d8c2f579 100644 --- a/library/src/commonMain/kotlin/com/tidal/networktime/internal/NtpExchanger.kt +++ b/library/src/commonMain/kotlin/com/tidal/networktime/internal/NtpExchanger.kt @@ -1,13 +1,11 @@ package com.tidal.networktime.internal -import kotlin.random.Random import kotlin.time.Duration internal class NtpExchanger( private val referenceClock: ReferenceClock, private val ntpPacketSerializer: NtpPacketSerializer, private val ntpPacketDeserializer: NtpPacketDeserializer, - private val random: Random, ) { operator fun invoke( address: String, diff --git a/library/src/commonMain/kotlin/com/tidal/networktime/internal/NtpPacket.kt b/library/src/commonMain/kotlin/com/tidal/networktime/internal/NtpPacket.kt index f986bb9e..97ec54da 100644 --- a/library/src/commonMain/kotlin/com/tidal/networktime/internal/NtpPacket.kt +++ b/library/src/commonMain/kotlin/com/tidal/networktime/internal/NtpPacket.kt @@ -5,8 +5,8 @@ import kotlin.time.Duration.Companion.days internal data class NtpPacket( val leapIndicator: Int = 0, - val versionNumber: Int = 0, - val mode: Int = 0, + val versionNumber: Int, + val mode: Int, val stratum: Byte = 0, val poll: Byte = 0, val precision: Byte = 0, diff --git a/library/src/commonMain/kotlin/com/tidal/networktime/internal/SyncPeriodic.kt b/library/src/commonMain/kotlin/com/tidal/networktime/internal/SyncPeriodic.kt index 37c059aa..9e464c4e 100644 --- a/library/src/commonMain/kotlin/com/tidal/networktime/internal/SyncPeriodic.kt +++ b/library/src/commonMain/kotlin/com/tidal/networktime/internal/SyncPeriodic.kt @@ -21,7 +21,6 @@ internal class SyncPeriodic( referenceClock, NtpPacketSerializer(random), NtpPacketDeserializer(), - random, ), ) { suspend operator fun invoke() {