mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-20 08:38:56 +01:00
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user