Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. StreamSelectDriver.php

function StreamSelectDriver::getTimeout

Return value

float Seconds until next timer expires or -1 if there are no pending timers.

1 call to StreamSelectDriver::getTimeout()
StreamSelectDriver::dispatch in vendor/revolt/event-loop/src/EventLoop/Driver/StreamSelectDriver.php

File

vendor/revolt/event-loop/src/EventLoop/Driver/StreamSelectDriver.php, line 315

Class

StreamSelectDriver

Namespace

Revolt\EventLoop\Driver

Code

private function getTimeout() : float {
    $expiration = $this->timerQueue
        ->peek();
    if ($expiration === null) {
        return -1;
    }
    $expiration -= $this->now();
    return $expiration > 0 ? $expiration : 0.0;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal