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 27
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 57
Timebox returnEarly()

Indicate that the timebox can return early.

Return Value

Timebox

at line 67
Timebox dontReturnEarly()

Indicate that the timebox cannot return early.

Return Value

Timebox

at line 77
protected void usleep(int $microseconds)

Sleep for the specified number of microseconds.

Parameters

int $microseconds

Return Value

void