/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { UnexpectedDataError } from "#MatterError.js";
import { Branded } from "#util/Type.js";
import type { Duration } from "./Duration.js";
/**
 * A UNIX epoch timestamp in milliseconds.
 *
 * Note that the precision of the timestamp may be greater than milliseconds but is limited to floating point precision.
 */
export type Timestamp = Branded<number, "Timestamp"> | 0;
/**
 * Create a timestamp.
 *
 * Input may be a UNIX epoch value in milliseconds, a parseable date string, or a {@link Date}.
 */
export declare function Timestamp<T extends undefined | Timestamp.Definition>(source: T): T extends undefined ? undefined | Timestamp : Timestamp;
/**
 * Thrown when a textual timestamp cannot be parsed.
 */
export declare class TimestampFormatError extends UnexpectedDataError {
}
export declare namespace Timestamp {
    /**
     * Values that may be used to initialize a timestamp.
     */
    type Definition = number | bigint | string | Date;
    /**
     * Create a low-resolution timestamp from a seconds value.
     */
    function fromSeconds(source: number): number;
    /**
     * Create a high-resolution timestamp from a microsecond value.
     */
    function fromMicroseconds(source: number | bigint): Timestamp;
    /**
     * The UNIX epoch.
     */
    const zero: Timestamp;
    /**
     * Obtain a {@link Date} for a {@link Timestamp}.
     */
    function dateOf(timestamp: Timestamp): Date;
    /**
     * Compute the duration between two timestamps.
     */
    function delta(from: Timestamp, to?: Timestamp): Duration;
}
//# sourceMappingURL=Timestamp.d.ts.map