MCPcopy Create free account
hub / github.com/getsentry/sentry-javascript / timestampToMs

Function timestampToMs

packages/replay-internal/src/util/timestamp.ts:4–7  ·  view source on GitHub ↗
(timestamp: number)

Source from the content-addressed store, hash-verified

2 * Converts a timestamp to ms, if it was in s, or keeps it as ms.
3 */
4export function timestampToMs(timestamp: number): number {
5 const isMs = timestamp > 9999999999;
6 return isMs ? timestamp : timestamp * 1000;
7}
8
9/**
10 * Converts a timestamp to s, if it was in ms, or keeps it as s.

Callers 3

getEarliestTimestampMethod · 0.90
addEventMethod · 0.90
shouldAddEventFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected