Skip to content

adamant-api / index / getEpochTimeMs

Function: getEpochTimeMs()

ts
function getEpochTimeMs(timestamp?): number;

Defined in: src/helpers/time.ts:17

Returns the time since the ADAMANT epoch in milliseconds.

Suitable for the optional timestampMs transaction field. The matching second-precision timestamp must be derived from the same value with Math.floor(timestampMs / 1000) so the two stay within the same second.

Parameters

ParameterType
timestamp?number

Returns

number

Released under the GPL-3.0 License.