loop = $loop; } /** @return float */ public function now() { if ($this->now === null) { $this->now = \microtime(true); // remember clock for current loop tick only and update on next tick $now =& $this->now; $this->loop->futureTick(function () use (&$now) { assert($now !== null); $now = null; }); } return $this->now; } }