jaeger-client -> opentelemetry

This commit is contained in:
Andrew Dolgov
2023-10-20 17:12:29 +03:00
parent 45a9ff0c88
commit cdd7ad020e
1159 changed files with 93352 additions and 24252 deletions
+32
View File
@@ -0,0 +1,32 @@
<?php
declare(strict_types=1);
namespace OpenTelemetry\SDK\Common\Time;
class Util
{
/** @psalm-pure */
public static function nanosToMicros(int $nanoseconds): int
{
return intdiv($nanoseconds, ClockInterface::NANOS_PER_MICROSECOND);
}
/** @psalm-pure */
public static function nanosToMillis(int $nanoseconds): int
{
return intdiv($nanoseconds, ClockInterface::NANOS_PER_MILLISECOND);
}
/** @psalm-pure */
public static function secondsToNanos(int $seconds): int
{
return $seconds * ClockInterface::NANOS_PER_SECOND;
}
/** @psalm-pure */
public static function millisToNanos(int $milliSeconds): int
{
return $milliSeconds * ClockInterface::NANOS_PER_MILLISECOND;
}
}