Time
Helper functions having to do with time.
Functions
Section titled “Functions”getElapsedSeconds()
Section titled “getElapsedSeconds()”function getElapsedSeconds(startTime, roundToInteger?): number;Defined in: functions/time.ts:21
Helper function to get the number of elapsed seconds since a starting time.
By default, this function will return a whole number (using Math.floor on the
result), but this can be disabled with the “roundToInteger” parameter.
For example:
const startTime = Date.now();doSomething();const elapsedSeconds = getElapsedSeconds(startTime);Parameters
Section titled “Parameters”| Parameter | Type | Default value |
|---|---|---|
startTime |
number |
undefined |
roundToInteger |
boolean |
true |
Returns
Section titled “Returns”number
