6 lines
No EOL
311 B
TypeScript
6 lines
No EOL
311 B
TypeScript
/*@internal*/
|
|
namespace ts {
|
|
declare const performance: { now?(): number } | undefined;
|
|
/** Gets a timestamp with (at least) ms resolution */
|
|
export const timestamp = typeof performance !== "undefined" && performance.now ? () => performance.now!() : Date.now ? Date.now : () => +(new Date());
|
|
} |