TP-00000 | Millis support added in schedulerAction (#205)
This commit is contained in:
@@ -20,6 +20,7 @@ data class SchedulerAction(
|
||||
|
||||
data class SchedulerActionItems(
|
||||
val delay: Int? = 0,
|
||||
val delayInMillis : Long? = 0,
|
||||
val actions: List<UiTronAction>? = null
|
||||
)
|
||||
|
||||
@@ -36,7 +37,7 @@ data class SchedulerAction(
|
||||
) = withContext(Dispatchers.IO) {
|
||||
|
||||
scheduledActionItems?.forEach { schedulerActionItem ->
|
||||
val delayInMillis = TimeUnit.SECONDS.toMillis(
|
||||
val delayInMillis = schedulerActionItem.delayInMillis ?: TimeUnit.SECONDS.toMillis(
|
||||
schedulerActionItem.delay.orZero().toLong()
|
||||
)
|
||||
delay(delayInMillis)
|
||||
|
||||
Reference in New Issue
Block a user