LastWinExecutor

class LastWinExecutor(timeSpanInMills: Long)

任务执行器,在规定的时间内执行提交,最后一个会被执行,之前的会被取消

Constructors

LastWinExecutor
Link copied to clipboard
fun LastWinExecutor(timeSpanInMills: Long)

Functions

clearAllTasks
Link copied to clipboard
fun clearAllTasks()
取消所有任务
equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
open fun hashCode(): Int
submit
Link copied to clipboard
fun submit(task: KRunnable)
提交一个任务,如果在提交后 @param timeSpanInMills 没有新任务, 则执行该任务,否则被取消
toString
Link copied to clipboard
open fun toString(): String

Properties

handler
Link copied to clipboard
private val handler: Handler
timeSpanInMills
Link copied to clipboard
private val timeSpanInMills: Long