Package com.openai.core
Interface Sleeper
-
- All Implemented Interfaces:
-
java.lang.AutoCloseable
public interface Sleeper implements AutoCloseable
An interface for delaying execution for a specified amount of time.
Useful for testing and cleaning up resources.
-
-
Method Summary
Modifier and Type Method Description abstract Unit
sleep(Duration duration)
Synchronously pauses execution for the given duration. abstract CompletableFuture<Void>
sleepAsync(Duration duration)
Asynchronously pauses execution for the given duration. abstract Unit
close()
Overridden from AutoCloseable to not have a checked exception in its signature. -
-
Method Detail
-
sleepAsync
abstract CompletableFuture<Void> sleepAsync(Duration duration)
Asynchronously pauses execution for the given duration.
-
close
abstract Unit close()
Overridden from AutoCloseable to not have a checked exception in its signature.
-
-
-
-