Most visited

Recently visited

Added in API level 1

Delayed

public interface Delayed
implements Comparable<Delayed>

java.util.concurrent.Delayed
Known Indirect Subclasses


混合式界面用于标记在给定延迟后应该执行的对象。

该接口的实现必须定义一个 compareTo方法,该方法提供与其 getDelay方法一致的排序。

Summary

Public methods

abstract long getDelay(TimeUnit unit)

以给定的时间单位返回与此对象关联的剩余延迟。

Inherited methods

From interface java.lang.Comparable

Public methods

getDelay

Added in API level 1
long getDelay (TimeUnit unit)

以给定的时间单位返回与此对象关联的剩余延迟。

Parameters
unit TimeUnit: the time unit
Returns
long the remaining delay; zero or negative values indicate that the delay has already elapsed

Hooray!