UNPKG

627 BTypeScriptView Raw
1/**
2 * @name millisecondsToSeconds
3 * @category Conversion Helpers
4 * @summary Convert milliseconds to seconds.
5 *
6 * @description
7 * Convert a number of milliseconds to a full number of seconds.
8 *
9 * @param milliseconds - The number of milliseconds to be converted
10 *
11 * @returns The number of milliseconds converted in seconds
12 *
13 * @example
14 * // Convert 1000 milliseconds to seconds:
15 * const result = millisecondsToSeconds(1000)
16 * //=> 1
17 *
18 * @example
19 * // It uses floor rounding:
20 * const result = millisecondsToSeconds(1999)
21 * //=> 1
22 */
23export declare function millisecondsToSeconds(milliseconds: number): number;