fix(core): update
This commit is contained in:
parent
3821799070
commit
9f599e79a1
@ -33,7 +33,7 @@ export let delayForRandom = async <T>(
|
|||||||
export class Timeout<T> {
|
export class Timeout<T> {
|
||||||
promise: Promise<T>;
|
promise: Promise<T>;
|
||||||
private _deferred: smartpromise.Deferred<T>;
|
private _deferred: smartpromise.Deferred<T>;
|
||||||
private _timeout: any;
|
private _timeout;
|
||||||
private _cancelled: boolean = false;
|
private _cancelled: boolean = false;
|
||||||
|
|
||||||
private timeoutInMillis: number;
|
private timeoutInMillis: number;
|
||||||
@ -63,7 +63,7 @@ export class Timeout<T> {
|
|||||||
*/
|
*/
|
||||||
public cancel() {
|
public cancel() {
|
||||||
this._cancelled = true;
|
this._cancelled = true;
|
||||||
this.makeUnrefed();
|
clearTimeout(this._timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
public getTimeLeft() {
|
public getTimeLeft() {
|
||||||
|
Loading…
Reference in New Issue
Block a user