1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-26 03:58:44 +00:00
This commit is contained in:
InsanusMokrassar 2023-05-27 18:33:28 +06:00
parent 67096f8e0e
commit 393197eca1
3 changed files with 3 additions and 3 deletions

View File

@ -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(

View File

@ -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(

View File

@ -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)