MCPcopy Create free account
hub / github.com/Effect-TS/effect / timestamp

Function timestamp

packages/effect/src/unstable/cluster/Snowflake.ts:176–176  ·  view source on GitHub ↗
(snowflake: Snowflake)

Source from the content-addressed store, hash-verified

174 * @since 4.0.0
175 */
176export const timestamp = (snowflake: Snowflake): number => Number(snowflake >> constBigInt22) + sinceUnixEpoch
177
178/**
179 * Extracts the timestamp from a snowflake id as a `DateTime.Utc`.

Callers 2

dateTimeFunction · 0.85
toPartsFunction · 0.85

Calls 1

NumberInterface · 0.50

Tested by

no test coverage detected