Skip to content

Instantly share code, notes, and snippets.

@TorbjornHoltmon
Created January 10, 2023 16:02
Show Gist options
  • Save TorbjornHoltmon/15a3c92246446d2a913f5e3525674402 to your computer and use it in GitHub Desktop.
Save TorbjornHoltmon/15a3c92246446d2a913f5e3525674402 to your computer and use it in GitHub Desktop.
perfomance
let startTime = Date.now();
const prestand = () => {
const result = Date.now() - startTime;
startTime = Date.now();
return `${result} ms`;
};
let startTime = performance.now();
const prestand2 = () => {
const result = performance.now() - startTime;
startTime = performance.now();
return `${result} ms`;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment