UNPKG

@joergmittaglawo/dmvconfig

Version:

DMV Configuration scripts for Lawo V__matrix Distributed Multiviewers.

56 lines (55 loc) 1.93 kB
export declare abstract class Duration { abstract plus(other: Duration): Duration; abstract minus(other: Duration): Duration; abstract times(x: number): Duration; abstract divide_by(x: number): Duration; abstract as_ns(): number; abstract as_s(): number; abstract toString(): string; abstract equal(other: Duration): boolean; } export declare class Nanoseconds extends Duration { private readonly ns; constructor(ns: number); static make_of(x: number | Nanoseconds | Seconds): Nanoseconds; plus(other: Duration): Nanoseconds; minus(other: Duration): Nanoseconds; times(x: number): Nanoseconds; divide_by(x: number): Nanoseconds; as_ns(): number; as_s(): number; toString(): string; equal(other: Duration): boolean; } export declare class Seconds extends Duration { private readonly s; constructor(s: number); static make_of(x: number | Nanoseconds | Seconds): Nanoseconds; plus(other: Duration): Nanoseconds; minus(other: Duration): Nanoseconds; times(x: number): Nanoseconds; divide_by(x: number): Nanoseconds; as_ns(): number; as_s(): number; toString(): string; equal(other: Duration): boolean; } export declare class Timestamp { private readonly data; private static readonly MAX_SAFE_SECONDS; constructor(data: number | string); nanoseconds(): number; seconds(): number; private parts; /** a.distance_from(b) = a - b */ distance_from(other: Timestamp): Duration; /** a.distance_to(b) = b - a */ distance_to(other: Timestamp): Duration; plus(d: Duration): Timestamp; minus(d: Duration): Timestamp; toString(): string; toNumber(): number; /** compares timestamps to single-ns precision if both are string-typed, otherwise up to floating-point accuracy (~200ns for timestamps around the year 2020) */ equal(other: Timestamp): boolean; }