This commit is contained in:
2026-01-08 18:29:45 +08:00
parent d2f2829ca2
commit a8328ac8b9
6 changed files with 45 additions and 81 deletions

View File

@@ -1,5 +1,6 @@
package com.xscm.modulemain.utils
import com.blankj.utilcode.util.LogUtils
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Job
import kotlinx.coroutines.delay
@@ -18,7 +19,7 @@ class CountdownTimer {
while (true) {
val currentTime = System.currentTimeMillis() / 1000
val remainingTime = (endTimestamp - currentTime) * 1000 // 转换为毫秒
LogUtils.e("startCountdown:"+remainingTime)
if (remainingTime <= 0) {
_timeLeft.value = 0
break