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

Breadcrumb

  1. Drupal Core 11.1.x

Clock.php

Namespace

OpenTelemetry\API\Common\Time

File

vendor/open-telemetry/api/Common/Time/Clock.php

View source
<?php

declare (strict_types=1);
namespace OpenTelemetry\API\Common\Time;

final class Clock {
    private static ?ClockInterface $clock = null;
    public static function getDefault() : ClockInterface {
        return self::$clock ??= new SystemClock();
    }
    public static function setDefault(ClockInterface $clock) : void {
        self::$clock = $clock;
    }
    public static function reset() : void {
        self::$clock = null;
    }

}

Classes

Title Deprecated Summary
Clock

API Navigation

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