Skip to main content

Time

Helper functions having to do with time.

Functions

getElapsedSeconds()

function getElapsedSeconds(startTime): number

Helper function to get the number of elapsed seconds since a starting time.

This function always returns a whole number (using Math.floor on the result).

For example:

const startTime = Date.now();
doSomething();
const elapsedSeconds = getElapsedSeconds(startTime);

Parameters

ParameterType
startTimenumber

Returns

number

Defined in

functions/time.ts:20