pollsky
Version:
Chained Polling Library for Node.js: Friendly API with no external dependencies.
33 lines (32 loc) • 658 B
TypeScript
import { TimeUnit } from "./types";
/**
* Properties of `Time` class constructor
*/
interface TimeAttributes {
interval: number;
unit: TimeUnit;
}
/**
* 🔧 Helper class to store time interval and units of time.
*/
export declare class Time {
/**
* Time unit duration multiplayer.
*/
private static TIME_UNIT_MULTIPLIER;
/**
* Time value
*/
interval: number;
/**
* Time unit.
*/
unit: TimeUnit;
constructor(attributes: TimeAttributes);
/**
* Converts an object to milliseconds.
*/
toMilliseconds(): number;
}
export declare const getTimestamp: () => string;
export {};