Package com.openai.core
Class DefaultSleeper
-
- All Implemented Interfaces:
-
com.openai.core.Sleeper
,java.lang.AutoCloseable
public final class DefaultSleeper implements Sleeper
-
-
Constructor Summary
Constructors Constructor Description DefaultSleeper()
-
Method Summary
Modifier and Type Method Description Unit
sleep(Duration duration)
Synchronously pauses execution for the given duration. CompletableFuture<Void>
sleepAsync(Duration duration)
Asynchronously pauses execution for the given duration. Unit
close()
Overridden from AutoCloseable to not have a checked exception in its signature. -
-
Method Detail
-
sleepAsync
CompletableFuture<Void> sleepAsync(Duration duration)
Asynchronously pauses execution for the given duration.
-
close
Unit close()
Overridden from AutoCloseable to not have a checked exception in its signature.
-
-
-
-