2020-08-26 19:56:48 +08:00
|
|
|
|
module es {
|
|
|
|
|
|
export interface ITimer {
|
|
|
|
|
|
context: any;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 调用stop以停止此计时器再次运行。这对非重复计时器没有影响。
|
|
|
|
|
|
*/
|
|
|
|
|
|
stop();
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 将计时器的运行时间重置为0
|
|
|
|
|
|
*/
|
|
|
|
|
|
reset();
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2020-12-07 11:48:42 +08:00
|
|
|
|
* 返回投向T的上下文,作为方便
|
2020-08-26 19:56:48 +08:00
|
|
|
|
*/
|
|
|
|
|
|
getContext<T>(): T;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|