pub struct Timer<T, const N0: usize, const N: usize, const L: usize> { /* private fields */ }
Expand description

不可撤销的定时器

Implementations

获得添加任务数量

获得移除任务数量

获得滚动次数

放入一个定时任务

弹出一个定时任务

  • now 当前时间
  • @return Option<T> 弹出的定时元素

判断指定时间内是否还有定时任务

轮滚动 - 向后滚动一个最小粒度, 可能会造成轮的逐层滚动。如果滚动到底,则修正堆上全部的定时任务,并将堆上的到期任务放入轮中

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.