@lonu/stc
Version:
A tool for converting OpenApi/Swagger/Apifox into code.
18 lines • 677 B
TypeScript
/**
* prettyTime options
* - withSpaces Whether to use spaces to separate times, `1d2h3m5s` or `1d 2h 3m 5s`, default false
* - toFixedVal value pass to toFixed for seconds, default 1
* - longFormat Whether to use a long format, default false, `1d2h3m5s` or `1days 2hours 3minutes 5seconds`
*/
export interface prettyTimeOptions {
withSpaces?: boolean;
toFixedVal?: number;
longFormat?: boolean;
}
/**
* Convert time duration to a human readable string: 5d1h20m30s
*
* - milliseconds The number to format, unit milliseconds
*/
export declare function prettyTime(milliseconds: number, options?: prettyTimeOptions): string;
//# sourceMappingURL=time.d.ts.map