screen_rotation
Copied to Clipboard
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Performance Measurement</title> </head> <body> <div id="result"></div> <script> var startTime = window.performance.now(); // Perform some task or operation for (var i = 0; i < 100000; i++) { console.log(i) } var endTime = window.performance.now(); var elapsedTime = endTime - startTime; // Convert elapsed time to minutes and seconds var minutes = Math.floor(elapsedTime / 60000); var seconds = ((elapsedTime % 60000) / 1000).toFixed(2); // Display the result on the webpage var resultElement = document.getElementById("result"); resultElement.textContent = "Elapsed time: " + minutes + " minutes and " + seconds + " seconds"; </script> </body> </html>