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

Breadcrumb

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

function Duration::__construct

Same name in this branch
  1. 11.1.x vendor/phpunit/php-timer/src/Duration.php \SebastianBergmann\Timer\Duration::__construct()
  2. 11.1.x vendor/google/protobuf/src/Google/Protobuf/Duration.php \Google\Protobuf\Duration::__construct()

Throws

InvalidArgumentException

File

vendor/phpunit/phpunit/src/Event/Value/Telemetry/Duration.php, line 40

Class

Duration
@psalm-immutable

Namespace

PHPUnit\Event\Telemetry

Code

private function __construct(int $seconds, int $nanoseconds) {
    $this->ensureNotNegative($seconds, 'seconds');
    $this->ensureNotNegative($nanoseconds, 'nanoseconds');
    $this->ensureNanoSecondsInRange($nanoseconds);
    $this->seconds = $seconds;
    $this->nanoseconds = $nanoseconds;
}

API Navigation

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