MCPcopy Create free account
hub / github.com/GoogleCloudPlatform/nodejs-docs-samples / sleep

Function sleep

kms/test/kms.test.js:42–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40
41const waitForState = async (name, state) => {
42 const sleep = w => new Promise(r => setTimeout(r, w));
43
44 let [version] = await client.getCryptoKeyVersion({name});
45 while (version.state !== state) {

Callers 2

waitForStateFunction · 0.70
waitForImportJobStateFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected