Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
javascript function execution time
const time_start = new Date().getTime();
// some function
const time_end = new Date().getTime();
console.log(`search elapsed time ==> ${(time_end - time_start) / 1000}s`);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment