The timeout (if >= 0) is in microseconds.
PHP - Manual: event_base_loopexit
2025-10-24
(PECL libevent >= 0.0.1)
event_base_loopexit — Exit loop after a time
$event_base
[, int $timeout = -1
] ) : boolThe next event loop iteration after the given timer expires will complete normally, then exit without blocking for events again.
event_baseValid event base resource.
timeoutOptional timeout parameter (in microseconds).
event_base_loopexit() returns TRUE on success or FALSE on error.
官方地址:https://www.php.net/manual/en/function.event-base-loopexit.php