UNPKG

1.18 kBTypeScriptView Raw
1/**
2 * Returns a timestamp in seconds since the UNIX epoch using the Date API.
3 *
4 * TODO(v8): Return type should be rounded.
5 */
6export declare function dateTimestampInSeconds(): number;
7/**
8 * Returns a timestamp in seconds since the UNIX epoch using either the Performance or Date APIs, depending on the
9 * availability of the Performance API.
10 *
11 * BUG: Note that because of how browsers implement the Performance API, the clock might stop when the computer is
12 * asleep. This creates a skew between `dateTimestampInSeconds` and `timestampInSeconds`. The
13 * skew can grow to arbitrary amounts like days, weeks or months.
14 * See https://github.com/getsentry/sentry-javascript/issues/2590.
15 */
16export declare const timestampInSeconds: () => number;
17/**
18 * Internal helper to store what is the source of browserPerformanceTimeOrigin below. For debugging only.
19 */
20export declare let _browserPerformanceTimeOriginMode: string;
21/**
22 * The number of milliseconds since the UNIX epoch. This value is only usable in a browser, and only when the
23 * performance API is available.
24 */
25export declare const browserPerformanceTimeOrigin: number | undefined;
26//# sourceMappingURL=time.d.ts.map
\No newline at end of file