dash-core
Version:
A foundational toolkit of types, collections, services, and architectural patterns designed to accelerate application development.
27 lines (26 loc) • 855 B
TypeScript
import { TimeSpan } from "dash-core";
/**
* Represents a frequency as occurrences per given time span.
* Provides a computed delay between each occurrence.
*/
export declare class Rate {
/** Occurrences per interval */
readonly rate: number;
/** Time span over which the rate applies */
readonly interval: TimeSpan;
/**
* @param rate Number of occurrences per interval (must be > 0)
* @param interval Time span over which the rate applies
*/
constructor(rate: number, interval: TimeSpan);
/**
* Create a Rate instance.
* @param rate Number of occurrences per interval (must be > 0)
* @param interval Time span over which the rate applies
*/
static of(rate: number, interval: TimeSpan): Rate;
/**
* Delay between occurrences as a TimeSpan.
*/
get delay(): TimeSpan;
}