/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
public static void main
(String[] args
) { long startTime
= System.
nanoTime(); // Record the start time
// Perform 10,000,000 loops
for (int i = 0; i < 10_000_000; i++) {
// Just looping, no operation
}
long endTime
= System.
nanoTime(); // Record the end time double durationInSeconds = (endTime - startTime) / 1_000_000_000.0; // Convert to seconds
System.
out.
printf("Time taken: %.3f seconds%n", durationInSeconds
); }
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCiAgICBwdWJsaWMgc3RhdGljIHZvaWQgbWFpbihTdHJpbmdbXSBhcmdzKSB7CiAgICAgICAgbG9uZyBzdGFydFRpbWUgPSBTeXN0ZW0ubmFub1RpbWUoKTsgLy8gUmVjb3JkIHRoZSBzdGFydCB0aW1lCgogICAgICAgIC8vIFBlcmZvcm0gMTAsMDAwLDAwMCBsb29wcwogICAgICAgIGZvciAoaW50IGkgPSAwOyBpIDwgMTBfMDAwXzAwMDsgaSsrKSB7CiAgICAgICAgICAgIC8vIEp1c3QgbG9vcGluZywgbm8gb3BlcmF0aW9uCiAgICAgICAgfQoKICAgICAgICBsb25nIGVuZFRpbWUgPSBTeXN0ZW0ubmFub1RpbWUoKTsgLy8gUmVjb3JkIHRoZSBlbmQgdGltZQogICAgICAgIGRvdWJsZSBkdXJhdGlvbkluU2Vjb25kcyA9IChlbmRUaW1lIC0gc3RhcnRUaW1lKSAvIDFfMDAwXzAwMF8wMDAuMDsgLy8gQ29udmVydCB0byBzZWNvbmRzCgogICAgICAgIFN5c3RlbS5vdXQucHJpbnRmKCJUaW1lIHRha2VuOiAlLjNmIHNlY29uZHMlbiIsIGR1cmF0aW9uSW5TZWNvbmRzKTsKICAgIH0KfQ==