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
File
-
vendor/
open-telemetry/ api/ Common/ Time/ Clock.php, line 7
Namespace
OpenTelemetry\API\Common\TimeView 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 |