Skip to content

Instantly share code, notes, and snippets.

@yashb042
Last active October 17, 2023 05:07
Show Gist options
  • Save yashb042/b48b854d81135190a517382687e3b701 to your computer and use it in GitHub Desktop.
Save yashb042/b48b854d81135190a517382687e3b701 to your computer and use it in GitHub Desktop.
Noob Developer Execution Time logging
package org.example;
public class NoobDeveloperCode {
public void f1() {
long startTime = System.currentTimeMillis();
// This is the code that we want to measure
System.out.println("I am doing some basic tasks");
// The code ends here
long endTime = System.currentTimeMillis();
System.out.println("Time taken to do basic tasks: " + (endTime - startTime));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment