Amp\Delayed classDelayed implementsAmp\Promise

Creates a promise that resolves itself with a given value after a number of milliseconds.

Summary

Properties

Methods

Properties

Methods

__construct —public function__construct(int$time,mixed$value =null)
No documentation.
Type Parameter Description Default Value
int $time Milliseconds before succeeding the promise. none
mixed $value Succeed the promise with this value. null
reference —public functionreference()

References the internal watcher in the event loop, keeping the loop running while this promise is pending.

unreference —public functionunreference()

Unreferences the internal watcher in the event loop, allowing the loop to stop while this promise is pending if no other events are pending in the loop.

onResolve —public functiononResolve(callable$onResolved)
No documentation.
Type Parameter Description Default Value
callable $onResolved No documentation. none