I'm making calls to an external API which requires some time to initialize the resource I'm asking for after the initial call to create that resource.
Right now I have a piece of code which queries the API for status on the resource in a while loop, which breaks once the resource is ready. However this sends an unnecessary amount of status requests to the API. I would like to add a 60 second delay wait in the while loop before it calls the API again.
Is there a way to replicate this behavior?