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

Breadcrumb

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

function TimerQueue::peek

Returns the expiration time value at the top of the heap.

Time complexity: O(1).

Return value

float|null Expiration time of the callback at the top of the heap or null if the heap is empty.

File

vendor/revolt/event-loop/src/EventLoop/Internal/TimerQueue.php, line 84

Class

TimerQueue
Uses a binary tree stored in an array to implement a heap.

Namespace

Revolt\EventLoop\Internal

Code

public function peek() : ?float {
    return isset($this->callbacks[0]) ? $this->callbacks[0]->expiration : null;
}

API Navigation

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