mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 16:23:48 +00:00
fixes
This commit is contained in:
parent
67096f8e0e
commit
393197eca1
@ -8,7 +8,7 @@ import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.Transient
|
||||
import kotlin.math.roundToLong
|
||||
|
||||
private fun now(): Long = DateTime.nowUnixLong()
|
||||
private fun now(): Long = DateTime.nowUnixMillisLong()
|
||||
|
||||
@Serializable
|
||||
class CommonLimiter(
|
||||
|
@ -10,7 +10,7 @@ data class RetryAfterError(
|
||||
) : RequestError() {
|
||||
val canContinue = (seconds * 1000L) + startCountingMillis
|
||||
val leftToRetry: Long
|
||||
get() = canContinue - DateTime.nowUnixLong()
|
||||
get() = canContinue - DateTime.nowUnixMillisLong()
|
||||
}
|
||||
|
||||
data class MigrateChatId(
|
||||
|
@ -6,7 +6,7 @@ import kotlinx.serialization.Serializable
|
||||
import kotlin.test.Test
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
private val dateTimeUnix = DateTime.nowUnixLong()
|
||||
private val dateTimeUnix = DateTime.nowUnixMillisLong()
|
||||
private val dateTimeMillis = dateTimeUnix * 1000
|
||||
private val dateTime = DateTime(dateTimeMillis)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user