class Timebox

Properties

bool $earlyReturn

Indicates if the timebox is allowed to return early.

Methods

mixed
call(callable $callback, int $microseconds)

Invoke the given callback within the specified timebox minimum.

returnEarly()

Indicate that the timebox can return early.

dontReturnEarly()

Indicate that the timebox cannot return early.

void
usleep(int $microseconds)

Sleep for the specified number of microseconds.

Details

at line 26
mixed call(callable $callback, int $microseconds)

Invoke the given callback within the specified timebox minimum.

Parameters

callable $callback
int $microseconds

Return Value

mixed

Exceptions

Throwable

at line 54
Timebox returnEarly()

Indicate that the timebox can return early.

Return Value

Timebox

at line 64
Timebox dontReturnEarly()

Indicate that the timebox cannot return early.

Return Value

Timebox

at line 74
protected void usleep(int $microseconds)

Sleep for the specified number of microseconds.

Parameters

int $microseconds

Return Value

void