Skip to content

Commit

Permalink
Use a more general delay util
Browse files Browse the repository at this point in the history
  • Loading branch information
MicroFish91 committed Nov 5, 2024
1 parent f68a3c8 commit 1d137d8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/gitHubCopilotForAzure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import { callWithTelemetryAndErrorHandling, IActionContext, openUrl } from "@microsoft/vscode-azext-utils";
import { commands, Extension, ExtensionContext, extensions, window } from "vscode";
import { delay } from "./cloudConsole/cloudConsoleUtils";
import { delay } from "./utils/delay";
import { localize } from "./utils/localize";

const ghcpExtensionId = 'github.copilot';
Expand Down
8 changes: 8 additions & 0 deletions src/utils/delay.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

export async function delay(delayMs: number): Promise<void> {
await new Promise<void>((resolve: () => void): void => { setTimeout(resolve, delayMs); });
}

0 comments on commit 1d137d8

Please sign in to comment.