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

Breadcrumb

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

class Clock

Hierarchy

  • class \OpenTelemetry\API\Common\Time\Clock

Expanded class hierarchy of Clock

7 files declare their use of Clock
BatchSpanProcessorBuilder.php in vendor/open-telemetry/sdk/Trace/SpanProcessor/BatchSpanProcessorBuilder.php
ClockFactory.php in vendor/open-telemetry/sdk/Common/Time/ClockFactory.php
EventLoggerProvider.php in vendor/open-telemetry/sdk/Logs/EventLoggerProvider.php
LogRecordProcessorFactory.php in vendor/open-telemetry/sdk/Logs/LogRecordProcessorFactory.php
MeterProviderBuilder.php in vendor/open-telemetry/sdk/Metrics/MeterProviderBuilder.php

... See full list

File

vendor/open-telemetry/api/Common/Time/Clock.php, line 7

Namespace

OpenTelemetry\API\Common\Time
View source
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;
    }

}

Members

Title Sort descending Modifiers Object type Summary
Clock::$clock private static property
Clock::getDefault public static function
Clock::reset public static function
Clock::setDefault public static function

API Navigation

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