summaryrefslogtreecommitdiff
path: root/vendor/open-telemetry/sdk/Common/Time/ClockInterface.php
blob: 8f3170185d6a17dc509783139e8bb6fe40df2e03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php

declare(strict_types=1);

namespace OpenTelemetry\SDK\Common\Time;

interface ClockInterface
{
    public const MILLIS_PER_SECOND = 1_000;
    public const MICROS_PER_SECOND = 1_000_000;
    public const NANOS_PER_SECOND = 1_000_000_000;
    public const NANOS_PER_MILLISECOND = 1_000_000;
    public const NANOS_PER_MICROSECOND = 1_000;

    /**
     * Returns the current epoch wall-clock timestamp in nanoseconds
     */
    public function now(): int;
}