File

libs/core/src/lib/model/internal/timeInterval.ts

Extends

TimeInterval

Index

Properties

Constructor

constructor(from: number | Date, to?: number | Date)
Parameters :
Name Type Optional
from number | Date No
to number | Date Yes

Properties

Public from
Type : number
Public to
Type : number
export abstract class TimeInterval {

}

export class Timespan extends TimeInterval {

    public from: number;

    public to: number;

    constructor(from: number | Date, to?: number | Date) {
        super();
        this.from = from instanceof Date ? from.valueOf() : from;
        this.to = to ? (to instanceof Date ? to.valueOf() : to) : this.from;
    }

}

export class BufferedTime extends TimeInterval {
    public timestamp: Date;
    public bufferInterval: number;

    constructor(
        timestamp: Date,
        bufferInterval: number
    ) {
        super();
        this.timestamp = timestamp;
        this.bufferInterval = bufferInterval;
    }
}

result-matching ""

    No results matching ""