long start = System.nanoTime(); // Some processing long end = System.nanoTime(); System.out.println("Time:" + (end - start) / 1000000f + "ms"); Register as a new user and use Qiita more conveniently You get articles that match your needsYou can efficiently read back useful informationYou can use dark themeWhat you can do with signing up