DelayProvider Class
- java.
lang. Object - com.
microsoft. azure. management. resources. fluentcore. utils. DelayProvider
- com.
public class DelayProvider
A wrapper class for thread sleep.
Constructor Summary
| Constructor | Description | |
|---|---|---|
| DelayProvider() | ||
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| rx.Observable<T> |
delayedEmitAsync(T event, int milliseconds)
Creates an observable that emits the given item after the specified time in milliseconds. |
| org.joda.time.DateTime | now() |
| void |
sleep(int milliseconds)
Puts current thread on sleep for passed milliseconds. |
Methods inherited from java.lang.Object
java.lang.Object.clone
java.lang.Object.equals
java.lang.Object.finalize
java.lang.Object.getClass
java.lang.Object.hashCode
java.lang.Object.notify
java.lang.Object.notifyAll
java.lang.Object.toString
java.lang.Object.wait
java.lang.Object.wait
java.lang.Object.wait
Constructor Details
DelayProvider
public DelayProvider()
Method Details
delayedEmitAsync
public Observable<T> <T>delayedEmitAsync(T event, int milliseconds)
Creates an observable that emits the given item after the specified time in milliseconds.
Parameters:
event
- the event to emit
milliseconds
- the delay in milliseconds
Returns:
delayed observable
now
public DateTime now()
Returns:
the current time.
sleep
public void sleep(int milliseconds)
Puts current thread on sleep for passed milliseconds.
Parameters:
milliseconds
- time to sleep for