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

Breadcrumb

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

function SystemClock::calculateReferenceTime

Calculates the reference time which is later used to calculate the current wall clock time in nanoseconds by adding the current uptime.

1 call to SystemClock::calculateReferenceTime()
SystemClock::init in vendor/open-telemetry/api/Common/Time/SystemClock.php

File

vendor/open-telemetry/api/Common/Time/SystemClock.php, line 48

Class

SystemClock
@internal OpenTelemetry

Namespace

OpenTelemetry\API\Common\Time

Code

private static function calculateReferenceTime(float $wallClockMicroTime, int $upTime) : int {
    return (int) ($wallClockMicroTime * ClockInterface::NANOS_PER_SECOND) - $upTime;
}

API Navigation

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