refactor github auth to be a bit simpler. Remove PAT for GitHub auth since Settings Sync doesn't allow for it and add timeout so that GitHub Auth is not stuck.

This commit is contained in:
Tyler Leonhardt
2021-08-16 16:34:13 -07:00
parent 4ea225a1f0
commit 520fa49e68
7 changed files with 295 additions and 186 deletions

View File

@@ -98,3 +98,21 @@ export function arrayEquals<T>(one: ReadonlyArray<T> | undefined, other: Readonl
return true;
}
export class StopWatch {
private _startTime: number = Date.now();
private _stopTime: number = -1;
public stop(): void {
this._stopTime = Date.now();
}
public elapsed(): number {
if (this._stopTime !== -1) {
return this._stopTime - this._startTime;
}
return Date.now() - this._startTime;
}
}